aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-16nubus: Rename struct nubus_devFinn Thain1-1/+1
It is misleading to call a functional resource a "device". In adopting the Linux Driver Model, the struct device will be embedded in struct nubus_board. That will compound the terminlogy problem because drivers will bind with boards, not with functional resources. Avoid this by renaming struct nubus_dev as struct nubus_rsrc. "Functional resource" is the vendor's terminology so this helps avoid confusion. Cc: "David S. Miller" <davem@davemloft.net> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2017-11-20Merge tag 'fbdev-v4.15' of git://github.com/bzolnier/linuxLinus Torvalds26-723/+147
Pull fbdev updates from Bartlomiej Zolnierkiewicz: "There is nothing really major here (though removal of the dead igafb driver stands out in diffstat). Summary: - convert timers to use timer_setup() (Kees Cook, Thierry Reding) - fix panels support on iMX boards in mxsfb driver (Stefan Agner) - fix timeout on EDID read in udlfb driver (Ladislav Michl) - add missing modes to fix out of bounds access in controlfb driver (Geert Uytterhoeven) - update initialisation paths in sa1100fb driver to be more robust (Russell King) - fix error handling path of ->probe method in au1200fb driver (Christophe JAILLET) - fix handling of cases when either panel or crt is defined in sm501fb driver (Sudip Mukherjee, Colin Ian King) - add ability to the Goldfish FB driver to be recognized by OS via DT (Aleksandar Markovic) - structures constifications (Bhumika Goyal) - misc fixes (Allen Pais, Gustavo A. R. Silva, Dan Carpenter) - misc cleanups (Colin Ian King, Himanshu Jha, Markus Elfring) - remove dead igafb driver" * tag 'fbdev-v4.15' of git://github.com/bzolnier/linux: (42 commits) OMAPFB: prevent buffer underflow in omapfb_parse_vram_param() video: fbdev: sm501fb: fix potential null pointer dereference on fbi fbcon: Initialize ops->info early video: fbdev: Convert timers to use timer_setup() video: fbdev: pxa3xx_gcu: Convert timers to use timer_setup() fbdev: controlfb: Add missing modes to fix out of bounds access video: fbdev: sis_main: mark expected switch fall-throughs video: fbdev: cirrusfb: mark expected switch fall-throughs video: fbdev: aty: radeon_pm: mark expected switch fall-throughs video: fbdev: sm501fb: mark expected switch fall-through in sm501fb_blank_crt video: fbdev: intelfb: remove redundant variables video/fbdev/dnfb: Use common error handling code in dnfb_probe() sm501fb: suspend and resume fb if it exists sm501fb: unregister framebuffer only if registered sm501fb: deallocate colormap only if allocated video: goldfishfb: Add support for device tree bindings Documentation: Add device tree binding for Goldfish FB driver video: udlfb: Fix read EDID timeout video: fbdev: remove dead igafb driver video: fbdev: mxsfb: fix pixelclock polarity ...
2017-11-17Merge branch 'work.get_user_pages_fast' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-3/+1
Pull get_user_pages_fast() conversion from Al Viro: "A bunch of places switched to get_user_pages_fast()" * 'work.get_user_pages_fast' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ceph: use get_user_pages_fast() pvr2fs: use get_user_pages_fast() atomisp: use get_user_pages_fast() st: use get_user_pages_fast() via_dmablit(): use get_user_pages_fast() fsl_hypervisor: switch to get_user_pages_fast() rapidio: switch to get_user_pages_fast() vchiq_2835_arm: switch to get_user_pages_fast()
2017-11-17OMAPFB: prevent buffer underflow in omapfb_parse_vram_param()Dan Carpenter1-1/+1
We cap the upper bound of "fbnum" but we also need to check for negatives or make the type unsigned. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-17video: fbdev: sm501fb: fix potential null pointer dereference on fbiColin Ian King1-2/+4
The pointer fbi is dereferenced with par = fbi->par before there is a null check on fbi, hence there is a potential null pointer dereference on a null par. Fix this by moving the dereference after the null pointer check. Detected by CoverityScan, CID#1461301 ("Dereference before null check") Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-16Merge tag 'backlight-next-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlightLinus Torvalds3-6/+7
Pull backlight updates from Lee Jones: - handle 32bit overflow in pwm_bl - remove redundant code/checks in tps65217_bl and ili922x * tag 'backlight-next-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: ili922x: Remove redundant variable len backlight: tps65217_bl: Remove unnecessary default brightness check backlight: pwm_bl: Fix overflow condition
2017-11-16Merge tag 'mfd-next-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfdLinus Torvalds1-11/+3
Pull MFD updates from Lee Jones: "New drivers: - Add support for Cherry Trail Dollar Cove TI PMIC - Add support for Add Spreadtrum SC27xx series PMICs New device support: - Add support Regulator to axp20x New functionality: - Add DT support; aspeed-scu sc27xx-pmic - Add power saving support; rts5249 Fix-ups: - DT clean-up/rework; tps65217, max77693, iproc-cdru, iproc-mhb, tps65218 - Staticise/constify; stw481x - Use new succinct IRQ API; fsl-imx25-tsadc - Kconfig fix-ups; MFD_TPS65218 - Identify SPI method; lpc_ich - Use managed resources (devm_*) calls; ssbi - Remove unused/obsolete code/documentation; mc13xxx Bug fixes: - Fix typo in MAINTAINERS - Fix error handling; mxs-lradc - Clean-up IRQs on .remove; fsl-imx25-tsadc" * tag 'mfd-next-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (21 commits) dt-bindings: mfd: mc13xxx: Remove obsolete property mfd: axp20x: Add axp20x-regulator cell for AXP813 mfd: Add Spreadtrum SC27xx series PMICs driver dt-bindings: mfd: Add Spreadtrum SC27xx PMIC documentation mfd: ssbi: Use devm_of_platform_populate() mfd: fsl-imx25: Clean up irq settings during removal mfd: mxs-lradc: Fix error handling in mxs_lradc_probe() mfd: lpc_ich: Avoton/Rangeley uses SPI_BYT method mfd: tps65218: Introduce dependency on CONFIG_OF mfd: tps65218: Correct the config description MAINTAINERS: Fix Dialog search term for watchdog binding file mfd: fsl-imx25: Set irq handler and data in one go mfd: rts5249: Add support for RTS5250S power saving ACPI / PMIC: Add opregion driver for Intel Dollar Cove TI PMIC mfd: Add support for Cherry Trail Dollar Cove TI PMIC syscon: dt-bindings: Add binding document for iProc MHB block syscon: dt-bindings: Add binding doc for Broadcom iProc CDRU mfd: max77693: Add muic of_compatible in mfd_cell mfd: stw481x: Make three arrays static const, reduces object code size mfd: tps65217: Introduce dependency on CONFIG_OF ...
2017-11-13fbcon: Initialize ops->info earlyThierry Reding1-0/+1
During console takeover, which happens for all DRM/KMS setups using the fbdev helpers, fbcon_startup() is called before fbcon_init() and as a result con2fb_acquire_newinfo() will not be called (info->fbcon_par was set to non-NULL in fbcon_startup()) to assign ops->info. This causes the cursor_timer_handler() to unreference a NULL pointer. Avoid this by unconditionally assigning ops->info during fbcon_startup() so that it will be available early, but keep the additional assignment in con2fb_acquire_newinfo() to support console remapping at runtime. Signed-off-by: Thierry Reding <treding@nvidia.com> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-10video: fbdev: Convert timers to use timer_setup()Kees Cook5-18/+13
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. One tracking pointer was added. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: David Lechner <david@lechnology.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Sean Paul <seanpaul@chromium.org> Cc: Jean Delvare <jdelvare@suse.de> Cc: Hans de Goede <hdegoede@redhat.com> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> [b.zolnierkie: ported it over pxa3xx_gcu changes] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-10video: fbdev: pxa3xx_gcu: Convert timers to use timer_setup()Kees Cook1-8/+10
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This also fixes the use of the "priv" variable in QERROR(), since it was pointing to struct timer_list, not struct pxa3xx_gcu_priv. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> Cc: Himanshu Jha <himanshujha199640@gmail.com> [b.zolnierkie: trivial build fixup] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09fbdev: controlfb: Add missing modes to fix out of bounds accessGeert Uytterhoeven1-0/+2
Dan's static analysis says: drivers/video/fbdev/controlfb.c:560 control_setup() error: buffer overflow 'control_mac_modes' 20 <= 21 Indeed, control_mac_modes[] has only 20 elements, while VMODE_MAX is 22, which may lead to an out of bounds read when parsing vmode commandline options. The bug was introduced in v2.4.5.6, when 2 new modes were added to macmodes.h, but control_mac_modes[] wasn't updated: https://kernel.opensuse.org/cgit/kernel/diff/include/video/macmodes.h?h=v2.5.2&id=29f279c764808560eaceb88fef36cbc35c529aad Augment control_mac_modes[] with the two new video modes to fix this. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: sis_main: mark expected switch fall-throughsGustavo A. R. Silva1-0/+4
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115025 Addresses-Coverity-ID: 115026 Addresses-Coverity-ID: 115027 Addresses-Coverity-ID: 115028 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: cirrusfb: mark expected switch fall-throughsGustavo A. R. Silva1-2/+4
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: aty: radeon_pm: mark expected switch fall-throughsGustavo A. R. Silva1-0/+3
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: sm501fb: mark expected switch fall-through in sm501fb_blank_crtGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: intelfb: remove redundant variablesColin Ian King1-7/+2
Variables err_max, err_target and f_best are being assigned values but these are never read, hence they are redundant variables and can be removed. Cleans up clang warnings: drivers/video/fbdev/intelfb/intelfbhw.c:946:2: warning: Value stored to 'err_max' is never read drivers/video/fbdev/intelfb/intelfbhw.c:947:2: warning: Value stored to 'err_target' is never read drivers/video/fbdev/intelfb/intelfbhw.c:995:6: warning: Value stored to 'f_best' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: Maik Broemme <mbroemme@libmpq.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video/fbdev/dnfb: Use common error handling code in dnfb_probe()Markus Elfring1-6/+7
Add a jump target so that a bit of exception handling can be better reused at the end of this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09sm501fb: suspend and resume fb if it existsSudip Mukherjee1-0/+6
There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, suspend or resume it only if it is defined. Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09sm501fb: unregister framebuffer only if registeredSudip Mukherjee1-2/+4
There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, while removing the device, unregister the framebuffer only if it was registered. Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09sm501fb: deallocate colormap only if allocatedSudip Mukherjee1-0/+3
There are cases when panel and crt both are not defined and only one of them is defined and initialized. In such cases, while removing the device deallocate the colormap only if that particular fb is defined. Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: goldfishfb: Add support for device tree bindingsAleksandar Markovic1-1/+7
Add ability to the Goldfish FB driver to be recognized by OS via DT. Signed-off-by: Miodrag Dinic <miodrag.dinic@mips.com> Signed-off-by: Goran Ferenc <goran.ferenc@mips.com> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com> Cc: Douglas Leung <douglas.leung@mips.com> Cc: James Hogan <james.hogan@mips.com> Cc: Paul Burton <paul.burton@mips.com> Cc: Petar Jovanovic <petar.jovanovic@mips.com> Cc: Raghu Gandham <raghu.gandham@mips.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: udlfb: Fix read EDID timeoutLadislav Michl1-5/+5
While usb_control_msg function expects timeout in miliseconds, a value of HZ is used. Replace it with USB_CTRL_GET_TIMEOUT and also fix error message which looks like: udlfb: Read EDID byte 78 failed err ffffff92 as error is either negative errno or number of bytes transferred use %d format specifier. Returned EDID is in second byte, so return error when less than two bytes are received. Fixes: 18dffdf8913a ("staging: udlfb: enhance EDID and mode handling support") Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Cc: Bernie Thompson <bernie@plugable.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: remove dead igafb driverBartlomiej Zolnierkiewicz3-590/+0
igafb driver hasn't compiled since at least kernel v2.6.34 as commit 6016a363f6b5 ("of: unify phandle name in struct device_node") missed updating igafb.c to use dp->phandle instead of dp->node. Cc: "David S. Miller" <davem@davemloft.net> Cc: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: mxsfb: fix pixelclock polarityStefan Agner1-2/+11
The PIXDATA flags of the display_flags enum are controller centric, e.g. NEGEDGE means the controller shall drive the data signals on pixelclocks negative edge. However, the drivers flag is display centric: Sample the data on negative (falling) edge. Therefore, change the if statement to check for the POSEDGE flag (which is typically not set): Drive on positive edge => sample on negative edge Signed-off-by: Stefan Agner <stefan@agner.ch> Acked-by: Shawn Guo <shawnguo@kernel.org> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Liu Ying <Ying.Liu@freescale.com> Cc: Lothar Waßmann <LW@KARO-electronics.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Max Krummenacher <max.krummenacher@toradex.com> Cc: Mauro Salvini <mauro.salvini@smigroup.net> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: au1200fb: Style clean upChristophe JAILLET1-4/+4
Style clean-up. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: au1200fb: Propagate an error codeChristophe JAILLET1-3/+4
We should propagate the error code returned by 'fb_alloc_cmap()' instead of returning -EFAULT. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: au1200fb: Remove some dead codeChristophe JAILLET1-6/+0
There is no need to shut gcc up. It should not complain. Axe 'fbdev', it is never used in this function. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: au1200fb: Fix error handling pathChristophe JAILLET1-2/+10
Rewrite the exit path based on 'au1200fb_drv_remove()'. We can safely iterate for all already handled planes. Even if not completely initialized, the functions that are called will silently accept the 'fb_info' structure that is passed. As soon as we find a NULL in the '_au1200fb_infos' array, we know that we have released all what we needed to release. So we can 'break'. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: au1200fb: Fix incorrect IRQ freeingChristophe JAILLET1-2/+0
'au1200fb_drv_probe()' can not fail after a successful call to 'request_irq()'. So there is no point to call 'free_irq()' in the error handling path. Moreover, the hard coded AU1200_LCD_INT looks boggus since commit 1630d85a8312 ("au1200fb: fix hardcoded IRQ"). So, remove it. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> [b.zolnierkie: patch summary and description fixups] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: au1200fb: Release some resources if a memory allocation failsChristophe JAILLET1-1/+2
We should go through the error handling code instead of returning -ENOMEM directly. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: au1200fb: Return an error code if a memory allocation failsChristophe JAILLET1-1/+3
'ret' is known to be 0 at this point. In case of memory allocation error in 'framebuffer_alloc()', return -ENOMEM instead. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-09video: fbdev: au1200fb: Fix a potential double freeChristophe JAILLET1-1/+0
If 'fb_alloc_cmap()' fails, 'fbi->pseudo_palette' is freed and an error code is returned by 'au1200fb_init_fbinfo()'. The only caller, 'au1200fb_drv_probe()' goes to an error handling path where resources allocated in 'fb_alloc_cmap()' are freed. This leads to a double free of 'fbi->pseudo_palette'. Fix it by letting the caller free all resources in case of failure in 'au1200fb_init_fbinfo()'. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-11-08backlight: ili922x: Remove redundant variable lenColin Ian King1-2/+1
The variable len is assigned but never read, therefore it is redundant and can be removed. Cleans up clang warning: drivers/video/backlight/ili922x.c:276:2: warning: Value stored to 'len' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Jingoo Han <jingoohan1@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman67-0/+67
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-17video: sa1100fb: move pseudo palette into sa1100fb_info structureRussell King2-6/+5
Move the pseudo palette inside the driver private data structure so we don't have to play tricks to cater for it. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-17video: sa1100fb: fix video memory allocation leakRussell King1-5/+5
Don't leak the video memory allocation if register_framebuffer() fails. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-17video: sa1100fb: clean up failure pathRussell King1-13/+8
We merely return from the failed path, so remove all the gotos and use return statements instead. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-17video: sa1100fb: use devm_gpio_request_one()Russell King1-10/+7
Switch to using devm_gpio_request_one() to request the shannon gpio and move the request before the video memory allocation, so we request all device managed resources before this large allocation attempt. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-17video: sa1100fb: use devm_request_irq()Russell King1-9/+8
Use devm_request_irq() to request the interrupt (a little earlier too) so we can avoid having to manually clean this up. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-17video: sa1100fb: use devm_ioremap_resource()Russell King1-12/+8
Use devm_ioremap_resource() to map the LCD controller memory region, and remove the unnecessary cleanup for this. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-17video: sa1100fb: use devm_clk_get()Russell King1-4/+1
Use devm_clk_get() to get the clock for the LCD. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-17video: sa1100fb: use devm_kzalloc()Russell King1-4/+2
Use devm_kzalloc() when allocating the private data for the framebuffer device. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-17video: fbdev: pxa3xx_gcu: Use setup_timer and mod_timerHimanshu Jha1-6/+2
Use setup_timer and mod_timer API instead of structure assignments. This is done using Coccinelle and semantic patch used for this as follows: @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Cc: "Gustavo A. R. Silva" <gustavo@embeddedor.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-13mfd: tps65217: Introduce dependency on CONFIG_OFKeerthy1-11/+3
Currently the driver boots only via device tree hence add a dependency on CONFIG_OF. This leaves with a bunch of unused code so clean that up. This patch also makes use of probe_new function in place of the probe function so as to avoid passing i2c_device_id. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-10-13backlight: tps65217_bl: Remove unnecessary default brightness checkChristos Gkekas1-2/+1
Variable val holds the default brightness and is unsigned, therefore checking whether it is less than zero is redundant. Signed-off-by: Christos Gkekas <chris.gekas@gmail.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Jingoo Han <jingoohan1@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-10-13backlight: pwm_bl: Fix overflow conditionDerek Basehore1-2/+5
This fixes an overflow condition that can happen with high max brightness and period values in compute_duty_cycle. This fixes it by using a 64 bit variable for computing the duty cycle. Signed-off-by: Derek Basehore <dbasehore@chromium.org> Acked-by: Thierry Reding <thierry.reding@gmail.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2017-10-12video: fbdev: radeon: make const array post_divs static, reduces object code sizeColin Ian King1-1/+1
Don't populate the read-only const array post_divs on the stack, instead make it static. Makes the object code smaller by 90 bytes: Before: text data bss dec hex filename 40231 8584 896 49711 c22f radeon_base.o After: text data bss dec hex filename 39914 8744 960 49618 c1d2 radeon_base.o (gcc version 7.2.0, x86_64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-12video: fbdev: dnfb: make fb_var_screeninfo static and constBhumika Goyal1-1/+1
Make this structure static as it is not referenced in any other file. Make it const as it is used only during a copy operation. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Cc: Julia Lawall <julia.lawall@lip6.fr> [b.zolnierkie: split from combined patch] Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-12video: fbdev: sis: make const array specialtv static, reduces object code sizeColin Ian King1-1/+1
Don't populate the const array specialtv on the stack, instead make it static. Makes the object code smaller by over 1100 bytes: Before: text data bss dec hex filename 179899 7504 0 187403 2dc0b drivers/video/fbdev/sis/init301.o After: text data bss dec hex filename 178720 7568 0 186288 2d7b0 drivers/video/fbdev/sis/init301.o (gcc version 7.2.0, x86_64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
2017-10-12video: fbdev: aty: make const arrays static, reduces object code sizeColin Ian King1-2/+2
Don't populate the const arrays ragepro_tbl and ragexl_tbl on the stack, instead make them static. Makes the object code smaller by over 380 bytes: Before: text data bss dec hex filename 41089 10592 768 52449 cce1 atyfb_base.o After: text data bss dec hex filename 40544 10752 768 52064 cb60 atyfb_base.o (gcc version 7.2.0, x86_64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>