summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft
AgeCommit message (Collapse)Author
2019-10-04Staging: fbtft: fix memory leak in fbtft_framebuffer_allocNavid Emamdoost
In fbtft_framebuffer_alloc the error handling path should take care of releasing frame buffer after it is allocated via framebuffer_alloc, too. Therefore, in two failure cases the goto destination is changed to address this issue. Fixes: c296d5f9957c ("staging: fbtft: core support") Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@gmail.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20190930030949.28615-1-navid.emamdoost@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-01staging/fbtft: Remove flexfbNoralf Trønnes
flexfb was an attempt to write a generic fbtft driver that was abandoned. All the displays it supports are supported by other fbtft drivers. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20190917171843.10334-3-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-01staging/fbtft: Remove fbtft_deviceNoralf Trønnes
Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") removed the gpio code from fbtft_device rendering it useless. fbtft_device is a module that was used on the Raspberry Pi to dynamically add fbtft devices when the Pi didn't have Device Tree support. Just remove the module since it's the responsibility of Device Tree, ACPI or platform code to add devices. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20190917171843.10334-2-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-01staging/fbtft: Depend on OFNoralf Trønnes
Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") removed setting gpios via platform data. This means that fbtft will now only work with Device Tree so set the dependency. This also prevents a NULL pointer deref on non-DT platform because fbtftops.request_gpios is not set in that case anymore. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Cc: stable <stable@vger.kernel.org> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://lore.kernel.org/r/20190917171843.10334-1-noralf@tronnes.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-12staging: fbtft: make several arrays static const, makes object smallerColin Ian King
Don't populate the arrays on the stack but instead make them static const. Makes the object code smaller by 1329 bytes. Before: text data bss dec hex filename 5581 1488 64 7133 1bdd drivers/staging/fbtft/fb_hx8340bn.o 5444 1264 0 6708 1a34 drivers/staging/fbtft/fb_hx8347d.o 3581 1360 0 4941 134d drivers/staging/fbtft/fb_ili9163.o 7154 1552 0 8706 2202 drivers/staging/fbtft/fb_ili9320.o 7478 2544 0 10022 2726 drivers/staging/fbtft/fb_ili9325.o 6327 1424 0 7751 1e47 drivers/staging/fbtft/fb_s6d1121.o 6498 1776 0 8274 2052 drivers/staging/fbtft/fb_ssd1289.o After: text data bss dec hex filename 5376 1584 64 7024 1b70 drivers/staging/fbtft/fb_hx8340bn.o 5276 1328 0 6604 19cc drivers/staging/fbtft/fb_hx8347d.o 3581 1360 0 4941 134d drivers/staging/fbtft/fb_ili9163.o 6905 1616 0 8521 2149 drivers/staging/fbtft/fb_ili9320.o 7229 2608 0 9837 266d drivers/staging/fbtft/fb_ili9325.o 6030 1488 0 7518 1d5e drivers/staging/fbtft/fb_s6d1121.o 6249 1872 0 8121 1fb9 drivers/staging/fbtft/fb_ssd1289.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190906153052.31846-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-12Merge 5.3-rc4 into staging-nextGreg Kroah-Hartman
We need the iio/staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30Staging: fbtft: Fix some typo. pdc8544 --> pcd8544Christophe JAILLET
The driver is related to 'pcd8544'. However, 2 strings are about pdc8544 (c and d switched) Fix it. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20190725183856.17616-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25Staging: fbtft: Fix GPIO handlingJan Sebastian Götte
Commit c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") breaks GPIO handling. In several places, checks to only set a GPIO if it was configured ended up backwards. I have tested this fix. The fixed driver works with a ili9486 display connected to a raspberry pi via SPI. Fixes: c440eee1a7a1d ("Staging: fbtft: Switch to the gpio descriptor interface") Tested-by: Jan Sebastian Götte <linux@jaseg.net> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Signed-off-by: Jan Sebastian Götte <linux@jaseg.net> Link: https://lore.kernel.org/r/75ada52f-afa1-08bc-d0ce-966fc1110e70@jaseg.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25Staging: fbtft: Fix reset assertion when using gpio descriptorPhil Reid
Typically gpiod_set_value calls would assert the reset line and then release it using the symantics of: gpiod_set_value(par->gpio.reset, 0); ... delay gpiod_set_value(par->gpio.reset, 1); And the gpio binding would specify the polarity. Prior to conversion to gpiod calls the polarity in the DT was ignored and assumed to be active low. Fix it so that DT polarity is respected. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Jan Sebastian Götte <linux@jaseg.net> Signed-off-by: Phil Reid <preid@electromag.com.au> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/1563236677-5045-3-git-send-email-preid@electromag.com.au Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-25Staging: fbtft: Fix probing of gpio descriptorPhil Reid
Conversion to use gpio descriptors broke all gpio lookups as devm_gpiod_get_index was converted to use dev->driver->name for the gpio name lookup. Fix this by using the name param. In addition gpiod_get post-fixes the -gpios to the name so that shouldn't be included in the call. However this then breaks the of_find_property call to see if the gpio entry exists as all fbtft treats all gpios as optional. So use devm_gpiod_get_index_optional instead which achieves the same thing and is simpler. Nishad confirmed the changes where only ever compile tested. Fixes: c440eee1a7a1 ("Staging: fbtft: Switch to the gpio descriptor interface") Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Tested-by: Jan Sebastian Götte <linux@jaseg.net> Signed-off-by: Phil Reid <preid@electromag.com.au> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/1563236677-5045-2-git-send-email-preid@electromag.com.au Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-12fbdev: make unregister/unlink functions not failDaniel Vetter
Except for driver bugs (which we'll catch with a WARN_ON) this is only to report failures of the new driver taking over the console. There's nothing the outgoing driver can do about that, and no one ever bothered to actually look at these return values. So remove them all. v2: fixup unregister_framebuffer in savagefb, fbtft, ivtvfb, and neofb drivers, reported by kbuild. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl> Cc: Peter Rosin <peda@axentia.se> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Mikulas Patocka <mpatocka@redhat.com> Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-19-daniel.vetter@ffwll.ch
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-02staging: fbtft: fb_ssd1351.c: Replace bit shifting with BIT macroPayal Kshirsagar
Challenge suggested by coccinelle. Prefer using BIT and replace bit shifting with the BIT(x) macro. Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-02staging: fbtft: fb_agm1264k-fl.c: Replace bit shifting with BIT macroPayal Kshirsagar
Challenge suggested by coccinelle. Prefer using BIT and replace bit shifting with the BIT(x) macro. Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-19staging: fbtft: ternary statement to if statement.Bhagyashri Dighole
Convert a ternary statement into a if statement which is detected while resolving "WARNING: line over 80 characters". Use BIT() macro instead manually left shifting. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: fixed format-string errors.Jeremy Sowden
Added __printf attribute to declaration of fbtft_dbg_hex and fixed mismatches between format-specifiers and arguments in several function calls. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: line over 80 charactersBhagyashri Dighole
Fix the checkpatch.pl warning WARNING: line over 80 characters Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: convert a macro to a function.Bhagyashri Dighole
Convert a macro to an inline function to improve type safety and make the code simpler. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: Remove unused #defines.Bhagyashri Dighole
Remove unused #defines, which is detected while resolving `CHECK: Avoid CamelCase` issue. Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: fbtft: Fix line over 80 charactersDaniela Mormocea
Fix line with over 80 characters to get rid of the warning given by checkpatch Signed-off-by: Daniela Mormocea <daniela.mormocea@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Fix line over 80 charactersBhanusree Pola
Fix the checkpatch.pl warning: WARNING:line over 80 characters Move Parameters to the next lines with proper alignment Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Extra blank line not required before '}'Bhanusree Pola
Remove unnecesessary extra blank line before the closing brace, to solve the checkpatch.pl check: CHECK: Extra blank line not required before closing brace '}' Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: fbtft: Alignment should match open parenthesisBhanusree Pola
Clear the warning found by checkpatch.pl WARNING:Alignment should match open parenthesis Adjust paremeters in fbtft_par_dbg and write_reg. Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18Staging: fbtft: Switch to the gpio descriptor interfaceNishad Kamdar
This switches the fbtft driver to use GPIO descriptors rather than numerical gpios: Utilize the GPIO library's intrinsic handling of OF GPIOs and polarity. If the line is flagged active low, gpiolib will deal with this. Remove gpios from platform device structure. Neither assign statically numbers to gpios in platform device nor allow gpios to be parsed as module parameters. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: fbtft: fix strncmp() size warningYueHaibing
strncmp() stops comparing when either the end of one of the first two arguments is reached or when 'n' characters have been compared, whichever comes first.That means that strncmp(s1, s2, n) is equivalent to strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. This patch avoids that the following warning is reported by smatch: drivers/staging/fbtft/fbtft_device.c:1458 fbtft_device_init() error: strncmp() '"list"' too small (5 vs 32) Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03staging: fbtft: Prefer using the BIT macroMamta Shukla
Replacing all occurrences of (1<<x) with BIT(x) to fix checkpatch issue. CHECK:Prefer using the BIT macro Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-16Merge 4.19-rc4 into staging-nextGreg Kroah-Hartman
Handle the merge issues and take the iio and staging driver fixes. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10staging/fbtft: Update TODO and mailing listsDaniel Vetter
Motivated by the ksummit-discuss discussion. Cc: Shuah Khan <shuahkhan@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Cc: linux-fbdev@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27staging: fbtft: Adds space around "/"Leonardo Brás
Kernel coding style recommends a space char around "/". Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Add spaces around / - StyleLeonardo Brás
Puts spaces around the /. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Erases some repetitive usage of function name - StyleLeonardo Brás
Changes this functions to avoid using "blank" on debug twice. Improves log readability. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Adjust some empty-line problems - StyleLeonardo Brás
Erases some blank lines. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Removes one nesting level to help readability - StyleLeonardo Brás
This nesting level was removed to improve readability. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Changes gamma table to define.Leonardo Brás
Most of other "Gamma Tables" were already boxed on a define, just did the same to PIOLED. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: A bit more information on dev_err.Leonardo Brás
Adds a bit more information on debug. The line break was to avoid obfuscating the parameters on the end of a large line. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Fixes some alignment issues - StyleLeonardo Brás
Fixes (most) alignment issues pointed by checkpatch.pl. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08staging: fbtft: Puts macro arguments in parenthesis to avoid precedence ↵Leonardo Brás
issues - Style Puts macro arguments in parenthesis to avoid precedence issues. Some large lines were broken to fit the 80-char limit. Signed-off-by: Leonardo Brás <leobras.c@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16staging: fbtft: Fix line continuationMatthias Wolf
Fix checkpatch warning: avoid unnecessary line continuation to allow grepping of whole error message. Signed-off-by: Matthias Wolf <der_wolf_@web.de> Signed-off-by: Felix Siegel <felix.siegel@stud.uni-hannover.de> Signed-off-by: Tim Cofala <cofala@stud.uni-hannover.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-16staging: fbtft: Fix line over 80 charactersMatthias Wolf
Fix checkpatch line over 80 characters where it seemed appropriate Signed-off-by: Matthias Wolf <der_wolf_@web.de> Signed-off-by: Felix Siegel <felix.siegel@stud.uni-hannover.de> Signed-off-by: Tim Cofala <cofala@stud.uni-hannover.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02staging: fbtft: indent fbtft_device_display - last entry - pdev - devRadek Dostál
The dev section was opening curly bracket, but not adding ident, which resulted in two times "}," after each other with same indentation. Add ident at the right place fixes this problem. This formatting issue is not detectable by checkpatch.pl Signed-off-by: Radek Dostál <radek.dostal@streamunlimited.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-11Merge tag 'backlight-next-4.18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Core Frameworks - Provide helpers to enable/disable backlight - Provide standard and devres versions OF find helpers New Drivers: - Add support for the Zodiac Inflight Innovations RAVE Supervisory Processor New Functionality: - Allow pwm-on/pwm-off delay to be specified via DT Bug Fixes: - Fix ordering of the power {en,dis}able and PWM {en,dis}able signals - Fix Device Tree node look-up" * tag 'backlight-next-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: as3711_bl: Fix Device Tree node leaks backlight: tps65217_bl: Fix Device Tree node lookup backlight: max8925_bl: Fix Device Tree node lookup backlight: as3711_bl: Fix Device Tree node lookup MAINTAINERS: Add dri-devel for backlight subsystem patches backlight: Nuke BL_CORE_DRIVER1 staging: fbtft: Stop using BL_CORE_DRIVER1 backlight: pandora: Stop using BL_CORE_DRIVER1 backlight: generic-bl: Remove DRIVER1 state backlight: Nuke unused backlight.props.state states backlight: otm3225a: Add support for ORISE OTM3225A LCD SoC backlight: pwm_bl: Don't use GPIOF_* with gpiod_get_direction pwm-backlight: Add support for PWM delays proprieties. dt-bindings: pwm-backlight: Add PWM delay proprieties. pwm-backlight: Enable/disable the PWM before/after LCD enable toggle. dt-bindings: backlight: Add binding for RAVE SP backlight driver backlight: Add RAVE SP backlight driver
2018-04-30staging: fbtft: Stop using BL_CORE_DRIVER1Daniel Vetter
Leaking driver internal tracking into the already massively confusing backlight power tracking is really confusing. Luckily we have already a drvdata structure, so fixing this is really easy. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-04-23staging: fbtft: Fixed lines exceeding columns limitRenato Soma
Fix checkpatch.pl warnings of lines exceeding 80 columns. Break lines in order to reduce instructions lengths to less than 80 columns. Signed-off-by: Renato Soma <renatoys08@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: fbtft: Add TODO file with GPIO work itemLinus Walleij
To make sure that these drivers do not leave staging before they are properly converted to use the new GPIO descriptor API, create the TODO file with this work item. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Noralf Tronnes <notro@tronnes.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-25staging: fbtft: remove unused FB_TFT_SSD1325 kconfigCorentin Labbe
Since nothing builds/depends on FB_TFT_SSD1325, we could remove it. Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: fbtft: remove redundant license textGreg Kroah-Hartman
Now that the SPDX tag is in all fbtft files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-15staging: fbtft: add SPDX identifiersGreg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the all of the staging fbtft drivers to have a proper SPDX identifier, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10staging: fbtft: Fix indentationLuis Gerhorst
This fixes the checkpatch message: CHECK: Alignment should match open parenthesis #1380: FILE: drivers/staging/fbtft/fbtft-core.c:1380: + dev_warn(dev, + "no default functions for regwidth=%d and buswidth=%d\n", Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de> Signed-off-by: Jonny Schaefer <schaefer.jonny@gmail.com> Acked-by: Alexander Wuerstlein <arw@cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08drivers/fbtft: Remove unnecessary braces from if/elseLuis Gerhorst
The Linux kernel coding style states that braces should only be used when necessary. This fixes the checkpatch warning WARNING: line over 80 characters + } else if (display->regwidth == 8 && display->buswidth == 9 && par->spi) { introduced by patch #1. Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de> Acked-by: Jonny Schaefer <schaefer.jonny@gmail.com> Acked-by: Alexander Wuerstlein <arw@cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-08drivers/fbtft: Remove newline after else in else-ifLuis Gerhorst
This removes the following warning issued by checkpatch WARNING: suspect code indent for conditional statements (8, 8) + } else + if (display->regwidth == 8 && display->buswidth == 9 && par->spi) { Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de> Acked-by: Jonny Schaefer <schaefer.jonny@gmail.com> Acked-by: Alexander Wuerstlein <arw@cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>