summaryrefslogtreecommitdiff
path: root/drivers/auxdisplay/panel.c
AgeCommit message (Collapse)AuthorFilesLines
2020-03-18misc: cleanup minor number definitions in c file into miscdevice.hZhenzhong Duan1-2/+0
HWRNG_MINOR and RNG_MISCDEV_MINOR are duplicate definitions, use unified HWRNG_MINOR instead and moved into miscdevice.h ANSLCD_MINOR and LCD_MINOR are duplicate definitions, use unified LCD_MINOR instead and moved into miscdevice.h MISCDEV_MINOR is renamed to PXA3XX_GCU_MINOR and moved into miscdevice.h Other definitions are just moved without any change. Link: https://lore.kernel.org/lkml/20200120221323.GJ15860@mit.edu/t/ Suggested-by: Arnd Bergmann <arnd@arndb.de> Build-tested-by: Willy TARREAU <wtarreau@haproxy.com> Build-tested-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com> Acked-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Link: https://lore.kernel.org/r/20200311071654.335-2-zhenzhong.duan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-08auxdisplay: charlcd: move charlcd.h to drivers/auxdisplayMasahiro Yamada1-1/+1
This header is included in drivers/auxdisplay/. Make it a local header. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
2019-08-05auxdisplay: panel: need to delete scan_timer when misc_register fails in ↵zhengbin1-0/+2
panel_attach In panel_attach, if misc_register fails, we need to delete scan_timer, which was setup in keypad_init->init_scan_timer. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
2019-03-17auxdisplay: panel: Convert to use charlcd_free()Andy Shevchenko1-2/+2
Convert to use charlcd_free() instead of kfree() for sake of type check. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
2018-09-30Compiler Attributes: auxdisplay: panel: use __nonstringMiguel Ojeda1-4/+3
Let gcc know these arrays are not meant to be NUL-terminated by annotating them with the new __nonstring variable attribute; and remove the comment since it conveys the same information. Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # on top of v4.19-rc5, clang 7 Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
2018-04-12auxdisplay: Replace licenses with SPDX identifiersMiguel Ojeda1-5/+1
Cc: Philippe Ombredanne <pombredanne@nexb.com> Acked-by: Willy Tarreau <w@1wt.eu> Acked-by: Linus Walleij <triad@dflund.se> Acked-by: Robin van der Gracht <robin@protonic.nl> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
2018-03-13auxdisplay: panel: Change comments to silence fallthrough warningsMiguel Ojeda1-3/+3
Compiling with W=1 with gcc 7.2.0 gives 3 warnings like: drivers/auxdisplay/panel.c: In function ‘panel_process_inputs’: drivers/auxdisplay/panel.c:1374:17: warning: this statement may fall through [-Wimplicit-fallthrough=] Cc: Willy Tarreau <w@1wt.eu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
2017-11-03auxdisplay: Convert timers to use timer_setup()Kees Cook1-2/+2
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. Cc: Paul Burton <paul.burton@imgtec.com> Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Paul Burton <paul.burton@mips.com> Tested-by: Paul Burton <paul.burton@mips.com> # for img-ascii-lcd
2017-09-18auxdisplay: charlcd: properly restore atomic counter on error pathWilly Tarreau1-2/+9
Commit f4757af ("staging: panel: Fix single-open policy race condition") introduced in 3.19-rc1 attempted to fix a race condition on the open, but failed to properly do it and used to exit without restoring the semaphore. This results in -EBUSY being returned after the first open error until the module is reloaded or the system restarted (ie: consecutive to a dual open resulting in -EBUSY or to a permission error). [ Note for stable maintainers: the code moved from drivers/misc/panel.c to drivers/auxdisplay/{charlcd,panel}.c during 4.12. The patch easily applies there (modulo the renamed atomic counter) but I can provide a tested backport if desired. ] Fixes: f4757af85 # 3.19-rc1 Cc: stable@vger.kernel.org Cc: Mariusz Gorski <marius.gorski@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-17auxdisplay: constify charlcd_ops.Arvind Yadav1-3/+3
charlcd_ops are not supposed to change at runtime. All functions working with charlcd_ops provided by <misc/charlcd.h> work with const charlcd_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 12750 560 362 13672 3568 drivers/auxdisplay/panel.o File size After adding 'const': text data bss dec hex filename 12942 368 362 13672 3568 drivers/auxdisplay/panel.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25auxdisplay: Convert list_for_each to entry variantWei Yongjun1-4/+1
convert list_for_each() to list_for_each_entry() where applicable. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08auxdisplay: Move panel.c to drivers/auxdisplay folderAndy Shevchenko1-0/+1796
It looks like panel.c belongs to auxdisplay subsystem. Move it to drivers/auxdisplay folder. No functional changes intended. Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>