lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 24 Sep 2022 06:42:26 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     kbuild-all@...ts.01.org,
        Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: [PATCH v1 2/2] Input: matrix_keypad - replace header inclusions
 by forward declarations

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on dtor-input/next]
[also build test ERROR on hid/for-next linus/master v6.0-rc6 next-20220923]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/Input-matrix_keypad-add-missed-header-inclusion/20220924-024709
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: sh-allmodconfig
compiler: sh4-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/intel-lab-lkp/linux/commit/baec96dd9b994bf310565d1eca5eb476fa9c0fd3
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/Input-matrix_keypad-add-missed-header-inclusion/20220924-024709
        git checkout baec96dd9b994bf310565d1eca5eb476fa9c0fd3
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/input/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   drivers/input/keyboard/ep93xx_keypad.c: In function 'ep93xx_keypad_irq_handler':
>> drivers/input/keyboard/ep93xx_keypad.c:99:25: error: implicit declaration of function 'input_report_key' [-Werror=implicit-function-declaration]
      99 |                         input_report_key(input_dev, keypad->key1, 0);
         |                         ^~~~~~~~~~~~~~~~
>> drivers/input/keyboard/ep93xx_keypad.c:128:9: error: implicit declaration of function 'input_sync' [-Werror=implicit-function-declaration]
     128 |         input_sync(input_dev);
         |         ^~~~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c: In function 'ep93xx_keypad_open':
>> drivers/input/keyboard/ep93xx_keypad.c:158:40: error: implicit declaration of function 'input_get_drvdata'; did you mean 'dev_get_drvdata'? [-Werror=implicit-function-declaration]
     158 |         struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
         |                                        ^~~~~~~~~~~~~~~~~
         |                                        dev_get_drvdata
>> drivers/input/keyboard/ep93xx_keypad.c:158:40: warning: initialization of 'struct ep93xx_keypad *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/input/keyboard/ep93xx_keypad.c: In function 'ep93xx_keypad_close':
   drivers/input/keyboard/ep93xx_keypad.c:171:40: warning: initialization of 'struct ep93xx_keypad *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     171 |         struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
         |                                        ^~~~~~~~~~~~~~~~~
   In file included from include/linux/seqlock.h:19,
                    from include/linux/mm_types.h:19,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from drivers/input/keyboard/ep93xx_keypad.c:21:
   drivers/input/keyboard/ep93xx_keypad.c: In function 'ep93xx_keypad_suspend':
>> drivers/input/keyboard/ep93xx_keypad.c:186:30: error: invalid use of undefined type 'struct input_dev'
     186 |         mutex_lock(&input_dev->mutex);
         |                              ^~
   include/linux/mutex.h:187:44: note: in definition of macro 'mutex_lock'
     187 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
         |                                            ^~~~
   drivers/input/keyboard/ep93xx_keypad.c:193:32: error: invalid use of undefined type 'struct input_dev'
     193 |         mutex_unlock(&input_dev->mutex);
         |                                ^~
   drivers/input/keyboard/ep93xx_keypad.c: In function 'ep93xx_keypad_resume':
   drivers/input/keyboard/ep93xx_keypad.c:204:30: error: invalid use of undefined type 'struct input_dev'
     204 |         mutex_lock(&input_dev->mutex);
         |                              ^~
   include/linux/mutex.h:187:44: note: in definition of macro 'mutex_lock'
     187 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
         |                                            ^~~~
>> drivers/input/keyboard/ep93xx_keypad.c:206:13: error: implicit declaration of function 'input_device_enabled' [-Werror=implicit-function-declaration]
     206 |         if (input_device_enabled(input_dev)) {
         |             ^~~~~~~~~~~~~~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c:214:32: error: invalid use of undefined type 'struct input_dev'
     214 |         mutex_unlock(&input_dev->mutex);
         |                                ^~
   drivers/input/keyboard/ep93xx_keypad.c: In function 'ep93xx_keypad_probe':
>> drivers/input/keyboard/ep93xx_keypad.c:269:21: error: implicit declaration of function 'devm_input_allocate_device' [-Werror=implicit-function-declaration]
     269 |         input_dev = devm_input_allocate_device(&pdev->dev);
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/input/keyboard/ep93xx_keypad.c:269:19: warning: assignment to 'struct input_dev *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     269 |         input_dev = devm_input_allocate_device(&pdev->dev);
         |                   ^
   drivers/input/keyboard/ep93xx_keypad.c:275:18: error: invalid use of undefined type 'struct input_dev'
     275 |         input_dev->name = pdev->name;
         |                  ^~
   drivers/input/keyboard/ep93xx_keypad.c:276:18: error: invalid use of undefined type 'struct input_dev'
     276 |         input_dev->id.bustype = BUS_HOST;
         |                  ^~
>> drivers/input/keyboard/ep93xx_keypad.c:276:33: error: 'BUS_HOST' undeclared (first use in this function)
     276 |         input_dev->id.bustype = BUS_HOST;
         |                                 ^~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c:276:33: note: each undeclared identifier is reported only once for each function it appears in
   drivers/input/keyboard/ep93xx_keypad.c:277:18: error: invalid use of undefined type 'struct input_dev'
     277 |         input_dev->open = ep93xx_keypad_open;
         |                  ^~
   drivers/input/keyboard/ep93xx_keypad.c:278:18: error: invalid use of undefined type 'struct input_dev'
     278 |         input_dev->close = ep93xx_keypad_close;
         |                  ^~
   In file included from include/linux/log2.h:12,
                    from include/asm-generic/div64.h:55,
                    from ./arch/sh/include/generated/asm/div64.h:1,
                    from include/linux/math.h:6,
                    from include/linux/math64.h:6,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/module.h:13:
>> drivers/input/keyboard/ep93xx_keypad.c:287:27: error: 'EV_REP' undeclared (first use in this function); did you mean 'ET_REL'?
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                           ^~~~~~
   include/linux/bitops.h:49:32: note: in definition of macro 'bitop'
      49 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   drivers/input/keyboard/ep93xx_keypad.c:287:17: note: in expansion of macro '__set_bit'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                 ^~~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:44: error: invalid use of undefined type 'struct input_dev'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                                            ^~
   include/linux/bitops.h:50:44: note: in definition of macro 'bitop'
      50 |           __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \
         |                                            ^~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:17: note: in expansion of macro '__set_bit'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                 ^~~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:44: error: invalid use of undefined type 'struct input_dev'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                                            ^~
   include/linux/bitops.h:51:23: note: in definition of macro 'bitop'
      51 |           (uintptr_t)(addr) != (uintptr_t)NULL &&                       \
         |                       ^~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:17: note: in expansion of macro '__set_bit'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                 ^~~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:44: error: invalid use of undefined type 'struct input_dev'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                                            ^~
   include/linux/bitops.h:52:57: note: in definition of macro 'bitop'
      52 |           __builtin_constant_p(*(const unsigned long *)(addr))) ?       \
         |                                                         ^~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:17: note: in expansion of macro '__set_bit'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                 ^~~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:44: error: invalid use of undefined type 'struct input_dev'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                                            ^~
   include/linux/bitops.h:53:24: note: in definition of macro 'bitop'
      53 |          const##op(nr, addr) : op(nr, addr))
         |                        ^~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:17: note: in expansion of macro '__set_bit'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                 ^~~~~~~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:44: error: invalid use of undefined type 'struct input_dev'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                                            ^~
   include/linux/bitops.h:53:39: note: in definition of macro 'bitop'
      53 |          const##op(nr, addr) : op(nr, addr))
         |                                       ^~~~
   drivers/input/keyboard/ep93xx_keypad.c:287:17: note: in expansion of macro '__set_bit'
     287 |                 __set_bit(EV_REP, input_dev->evbit);
         |                 ^~~~~~~~~
>> drivers/input/keyboard/ep93xx_keypad.c:288:9: error: implicit declaration of function 'input_set_drvdata'; did you mean 'dev_set_drvdata'? [-Werror=implicit-function-declaration]
     288 |         input_set_drvdata(input_dev, keypad);
         |         ^~~~~~~~~~~~~~~~~
         |         dev_set_drvdata
>> drivers/input/keyboard/ep93xx_keypad.c:296:15: error: implicit declaration of function 'input_register_device' [-Werror=implicit-function-declaration]
     296 |         err = input_register_device(input_dev);
         |               ^~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/input/keyboard/imx_keypad.c: In function 'imx_keypad_fire_events':
>> drivers/input/keyboard/imx_keypad.c:169:25: error: implicit declaration of function 'input_event' [-Werror=implicit-function-declaration]
     169 |                         input_event(input_dev, EV_MSC, MSC_SCAN, code);
         |                         ^~~~~~~~~~~
>> drivers/input/keyboard/imx_keypad.c:169:48: error: 'EV_MSC' undeclared (first use in this function)
     169 |                         input_event(input_dev, EV_MSC, MSC_SCAN, code);
         |                                                ^~~~~~
   drivers/input/keyboard/imx_keypad.c:169:48: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/input/keyboard/imx_keypad.c:169:56: error: 'MSC_SCAN' undeclared (first use in this function)
     169 |                         input_event(input_dev, EV_MSC, MSC_SCAN, code);
         |                                                        ^~~~~~~~
>> drivers/input/keyboard/imx_keypad.c:170:25: error: implicit declaration of function 'input_report_key' [-Werror=implicit-function-declaration]
     170 |                         input_report_key(input_dev, keypad->keycodes[code],
         |                         ^~~~~~~~~~~~~~~~
   In file included from include/linux/printk.h:573,
                    from include/linux/kernel.h:29,
                    from include/linux/clk.h:13,
                    from drivers/input/keyboard/imx_keypad.c:6:
>> drivers/input/keyboard/imx_keypad.c:172:43: error: invalid use of undefined type 'struct input_dev'
     172 |                         dev_dbg(&input_dev->dev, "Event code: %d, val: %d",
         |                                           ^~
   include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
     134 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
     166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:172:25: note: in expansion of macro 'dev_dbg'
     172 |                         dev_dbg(&input_dev->dev, "Event code: %d, val: %d",
         |                         ^~~~~~~
>> drivers/input/keyboard/imx_keypad.c:177:9: error: implicit declaration of function 'input_sync' [-Werror=implicit-function-declaration]
     177 |         input_sync(input_dev);
         |         ^~~~~~~~~~
   drivers/input/keyboard/imx_keypad.c: In function 'imx_keypad_close':
>> drivers/input/keyboard/imx_keypad.c:365:37: error: implicit declaration of function 'input_get_drvdata'; did you mean 'dev_get_drvdata'? [-Werror=implicit-function-declaration]
     365 |         struct imx_keypad *keypad = input_get_drvdata(dev);
         |                                     ^~~~~~~~~~~~~~~~~
         |                                     dev_get_drvdata
>> drivers/input/keyboard/imx_keypad.c:365:37: warning: initialization of 'struct imx_keypad *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/input/keyboard/imx_keypad.c:367:21: error: invalid use of undefined type 'struct input_dev'
     367 |         dev_dbg(&dev->dev, ">%s\n", __func__);
         |                     ^~
   include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
     134 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
     166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:367:9: note: in expansion of macro 'dev_dbg'
     367 |         dev_dbg(&dev->dev, ">%s\n", __func__);
         |         ^~~~~~~
   drivers/input/keyboard/imx_keypad.c: In function 'imx_keypad_open':
   drivers/input/keyboard/imx_keypad.c:382:37: warning: initialization of 'struct imx_keypad *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     382 |         struct imx_keypad *keypad = input_get_drvdata(dev);
         |                                     ^~~~~~~~~~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:385:21: error: invalid use of undefined type 'struct input_dev'
     385 |         dev_dbg(&dev->dev, ">%s\n", __func__);
         |                     ^~
   include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call'
     134 |                 func(&id, ##__VA_ARGS__);               \
         |                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:166:9: note: in expansion of macro '_dynamic_func_call'
     166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
         |         ^~~~~~~~~~~~~~~~~~
   include/linux/dev_printk.h:155:9: note: in expansion of macro 'dynamic_dev_dbg'
     155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:385:9: note: in expansion of macro 'dev_dbg'
     385 |         dev_dbg(&dev->dev, ">%s\n", __func__);
         |         ^~~~~~~
   In file included from include/linux/device.h:15,
                    from drivers/input/keyboard/imx_keypad.c:8:
   drivers/input/keyboard/imx_keypad.c:399:29: error: invalid use of undefined type 'struct input_dev'
     399 |                 dev_err(&dev->dev,
         |                             ^~
   include/linux/dev_printk.h:110:25: note: in definition of macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                         ^~~
   drivers/input/keyboard/imx_keypad.c:399:17: note: in expansion of macro 'dev_err'
     399 |                 dev_err(&dev->dev,
         |                 ^~~~~~~
   drivers/input/keyboard/imx_keypad.c: In function 'imx_keypad_probe':
>> drivers/input/keyboard/imx_keypad.c:427:21: error: implicit declaration of function 'devm_input_allocate_device' [-Werror=implicit-function-declaration]
     427 |         input_dev = devm_input_allocate_device(&pdev->dev);
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/input/keyboard/imx_keypad.c:427:19: warning: assignment to 'struct input_dev *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     427 |         input_dev = devm_input_allocate_device(&pdev->dev);
         |                   ^
   drivers/input/keyboard/imx_keypad.c:457:18: error: invalid use of undefined type 'struct input_dev'
     457 |         input_dev->name = pdev->name;
         |                  ^~
   drivers/input/keyboard/imx_keypad.c:458:18: error: invalid use of undefined type 'struct input_dev'
     458 |         input_dev->id.bustype = BUS_HOST;
         |                  ^~
>> drivers/input/keyboard/imx_keypad.c:458:33: error: 'BUS_HOST' undeclared (first use in this function)
     458 |         input_dev->id.bustype = BUS_HOST;
         |                                 ^~~~~~~~
   drivers/input/keyboard/imx_keypad.c:459:18: error: invalid use of undefined type 'struct input_dev'
     459 |         input_dev->dev.parent = &pdev->dev;
         |                  ^~
   drivers/input/keyboard/imx_keypad.c:460:18: error: invalid use of undefined type 'struct input_dev'
     460 |         input_dev->open = imx_keypad_open;
         |                  ^~
   drivers/input/keyboard/imx_keypad.c:461:18: error: invalid use of undefined type 'struct input_dev'
     461 |         input_dev->close = imx_keypad_close;
         |                  ^~
>> drivers/input/keyboard/imx_keypad.c:476:52: error: 'KEY_RESERVED' undeclared (first use in this function)
     476 |                         if (keypad->keycodes[i] != KEY_RESERVED) {
         |                                                    ^~~~~~~~~~~~
   In file included from include/linux/kernel.h:22:
>> drivers/input/keyboard/imx_keypad.c:485:19: error: 'EV_REP' undeclared (first use in this function); did you mean 'ET_REL'?
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |                   ^~~~~~
   include/linux/bitops.h:49:32: note: in definition of macro 'bitop'
      49 |         ((__builtin_constant_p(nr) &&                                   \
         |                                ^~
   drivers/input/keyboard/imx_keypad.c:485:9: note: in expansion of macro '__set_bit'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |         ^~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:485:36: error: invalid use of undefined type 'struct input_dev'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |                                    ^~
   include/linux/bitops.h:50:44: note: in definition of macro 'bitop'
      50 |           __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \
         |                                            ^~~~
   drivers/input/keyboard/imx_keypad.c:485:9: note: in expansion of macro '__set_bit'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |         ^~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:485:36: error: invalid use of undefined type 'struct input_dev'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |                                    ^~
   include/linux/bitops.h:51:23: note: in definition of macro 'bitop'
      51 |           (uintptr_t)(addr) != (uintptr_t)NULL &&                       \
         |                       ^~~~
   drivers/input/keyboard/imx_keypad.c:485:9: note: in expansion of macro '__set_bit'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |         ^~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:485:36: error: invalid use of undefined type 'struct input_dev'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |                                    ^~
   include/linux/bitops.h:52:57: note: in definition of macro 'bitop'
      52 |           __builtin_constant_p(*(const unsigned long *)(addr))) ?       \
         |                                                         ^~~~
   drivers/input/keyboard/imx_keypad.c:485:9: note: in expansion of macro '__set_bit'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |         ^~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:485:36: error: invalid use of undefined type 'struct input_dev'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |                                    ^~
   include/linux/bitops.h:53:24: note: in definition of macro 'bitop'
      53 |          const##op(nr, addr) : op(nr, addr))
         |                        ^~~~
   drivers/input/keyboard/imx_keypad.c:485:9: note: in expansion of macro '__set_bit'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |         ^~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:485:36: error: invalid use of undefined type 'struct input_dev'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |                                    ^~
   include/linux/bitops.h:53:39: note: in definition of macro 'bitop'
      53 |          const##op(nr, addr) : op(nr, addr))
         |                                       ^~~~
   drivers/input/keyboard/imx_keypad.c:485:9: note: in expansion of macro '__set_bit'
     485 |         __set_bit(EV_REP, input_dev->evbit);
         |         ^~~~~~~~~
>> drivers/input/keyboard/imx_keypad.c:486:9: error: implicit declaration of function 'input_set_capability' [-Werror=implicit-function-declaration]
     486 |         input_set_capability(input_dev, EV_MSC, MSC_SCAN);
         |         ^~~~~~~~~~~~~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:486:41: error: 'EV_MSC' undeclared (first use in this function)
     486 |         input_set_capability(input_dev, EV_MSC, MSC_SCAN);
         |                                         ^~~~~~
   drivers/input/keyboard/imx_keypad.c:486:49: error: 'MSC_SCAN' undeclared (first use in this function)
     486 |         input_set_capability(input_dev, EV_MSC, MSC_SCAN);
         |                                                 ^~~~~~~~
>> drivers/input/keyboard/imx_keypad.c:487:9: error: implicit declaration of function 'input_set_drvdata'; did you mean 'dev_set_drvdata'? [-Werror=implicit-function-declaration]
     487 |         input_set_drvdata(input_dev, keypad);
         |         ^~~~~~~~~~~~~~~~~
         |         dev_set_drvdata
>> drivers/input/keyboard/imx_keypad.c:504:17: error: implicit declaration of function 'input_register_device' [-Werror=implicit-function-declaration]
     504 |         error = input_register_device(input_dev);
         |                 ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/notifier.h:14,
                    from include/linux/clk.h:14:
   drivers/input/keyboard/imx_keypad.c: In function 'imx_kbd_noirq_suspend':
   drivers/input/keyboard/imx_keypad.c:524:30: error: invalid use of undefined type 'struct input_dev'
     524 |         mutex_lock(&input_dev->mutex);
         |                              ^~
   include/linux/mutex.h:187:44: note: in definition of macro 'mutex_lock'
     187 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
         |                                            ^~~~
>> drivers/input/keyboard/imx_keypad.c:526:13: error: implicit declaration of function 'input_device_enabled' [-Werror=implicit-function-declaration]
     526 |         if (input_device_enabled(input_dev))
         |             ^~~~~~~~~~~~~~~~~~~~
   drivers/input/keyboard/imx_keypad.c:529:32: error: invalid use of undefined type 'struct input_dev'
     529 |         mutex_unlock(&input_dev->mutex);
         |                                ^~
   drivers/input/keyboard/imx_keypad.c: In function 'imx_kbd_noirq_resume':
   drivers/input/keyboard/imx_keypad.c:554:30: error: invalid use of undefined type 'struct input_dev'
     554 |         mutex_lock(&input_dev->mutex);
         |                              ^~
   include/linux/mutex.h:187:44: note: in definition of macro 'mutex_lock'
     187 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
         |                                            ^~~~
   drivers/input/keyboard/imx_keypad.c:563:32: error: invalid use of undefined type 'struct input_dev'
     563 |         mutex_unlock(&input_dev->mutex);
         |                                ^~
   cc1: some warnings being treated as errors
..


vim +186 drivers/input/keyboard/ep93xx_keypad.c

e06003af56c386 H Hartley Sweeten     2009-04-18   81  
e06003af56c386 H Hartley Sweeten     2009-04-18   82  static irqreturn_t ep93xx_keypad_irq_handler(int irq, void *dev_id)
e06003af56c386 H Hartley Sweeten     2009-04-18   83  {
e06003af56c386 H Hartley Sweeten     2009-04-18   84  	struct ep93xx_keypad *keypad = dev_id;
e06003af56c386 H Hartley Sweeten     2009-04-18   85  	struct input_dev *input_dev = keypad->input_dev;
60214f058f44cf H Hartley Sweeten     2009-12-15   86  	unsigned int status;
e06003af56c386 H Hartley Sweeten     2009-04-18   87  	int keycode, key1, key2;
e06003af56c386 H Hartley Sweeten     2009-04-18   88  
60214f058f44cf H Hartley Sweeten     2009-12-15   89  	status = __raw_readl(keypad->mmio_base + KEY_REG);
60214f058f44cf H Hartley Sweeten     2009-12-15   90  
e06003af56c386 H Hartley Sweeten     2009-04-18   91  	keycode = (status & KEY_REG_KEY1_MASK) >> KEY_REG_KEY1_SHIFT;
a5abd95cc0b350 H Hartley Sweeten     2010-01-13   92  	key1 = keypad->keycodes[keycode];
e06003af56c386 H Hartley Sweeten     2009-04-18   93  
e06003af56c386 H Hartley Sweeten     2009-04-18   94  	keycode = (status & KEY_REG_KEY2_MASK) >> KEY_REG_KEY2_SHIFT;
a5abd95cc0b350 H Hartley Sweeten     2010-01-13   95  	key2 = keypad->keycodes[keycode];
e06003af56c386 H Hartley Sweeten     2009-04-18   96  
e06003af56c386 H Hartley Sweeten     2009-04-18   97  	if (status & KEY_REG_2KEYS) {
e06003af56c386 H Hartley Sweeten     2009-04-18   98  		if (keypad->key1 && key1 != keypad->key1 && key2 != keypad->key1)
e06003af56c386 H Hartley Sweeten     2009-04-18  @99  			input_report_key(input_dev, keypad->key1, 0);
e06003af56c386 H Hartley Sweeten     2009-04-18  100  
e06003af56c386 H Hartley Sweeten     2009-04-18  101  		if (keypad->key2 && key1 != keypad->key2 && key2 != keypad->key2)
e06003af56c386 H Hartley Sweeten     2009-04-18  102  			input_report_key(input_dev, keypad->key2, 0);
e06003af56c386 H Hartley Sweeten     2009-04-18  103  
e06003af56c386 H Hartley Sweeten     2009-04-18  104  		input_report_key(input_dev, key1, 1);
e06003af56c386 H Hartley Sweeten     2009-04-18  105  		input_report_key(input_dev, key2, 1);
e06003af56c386 H Hartley Sweeten     2009-04-18  106  
e06003af56c386 H Hartley Sweeten     2009-04-18  107  		keypad->key1 = key1;
e06003af56c386 H Hartley Sweeten     2009-04-18  108  		keypad->key2 = key2;
e06003af56c386 H Hartley Sweeten     2009-04-18  109  
e06003af56c386 H Hartley Sweeten     2009-04-18  110  	} else if (status & KEY_REG_1KEY) {
e06003af56c386 H Hartley Sweeten     2009-04-18  111  		if (keypad->key1 && key1 != keypad->key1)
e06003af56c386 H Hartley Sweeten     2009-04-18  112  			input_report_key(input_dev, keypad->key1, 0);
e06003af56c386 H Hartley Sweeten     2009-04-18  113  
e06003af56c386 H Hartley Sweeten     2009-04-18  114  		if (keypad->key2 && key1 != keypad->key2)
e06003af56c386 H Hartley Sweeten     2009-04-18  115  			input_report_key(input_dev, keypad->key2, 0);
e06003af56c386 H Hartley Sweeten     2009-04-18  116  
e06003af56c386 H Hartley Sweeten     2009-04-18  117  		input_report_key(input_dev, key1, 1);
e06003af56c386 H Hartley Sweeten     2009-04-18  118  
e06003af56c386 H Hartley Sweeten     2009-04-18  119  		keypad->key1 = key1;
e06003af56c386 H Hartley Sweeten     2009-04-18  120  		keypad->key2 = 0;
e06003af56c386 H Hartley Sweeten     2009-04-18  121  
e06003af56c386 H Hartley Sweeten     2009-04-18  122  	} else {
e06003af56c386 H Hartley Sweeten     2009-04-18  123  		input_report_key(input_dev, keypad->key1, 0);
e06003af56c386 H Hartley Sweeten     2009-04-18  124  		input_report_key(input_dev, keypad->key2, 0);
e06003af56c386 H Hartley Sweeten     2009-04-18  125  
e06003af56c386 H Hartley Sweeten     2009-04-18  126  		keypad->key1 = keypad->key2 = 0;
e06003af56c386 H Hartley Sweeten     2009-04-18  127  	}
e06003af56c386 H Hartley Sweeten     2009-04-18 @128  	input_sync(input_dev);
e06003af56c386 H Hartley Sweeten     2009-04-18  129  
e06003af56c386 H Hartley Sweeten     2009-04-18  130  	return IRQ_HANDLED;
e06003af56c386 H Hartley Sweeten     2009-04-18  131  }
e06003af56c386 H Hartley Sweeten     2009-04-18  132  
e06003af56c386 H Hartley Sweeten     2009-04-18  133  static void ep93xx_keypad_config(struct ep93xx_keypad *keypad)
e06003af56c386 H Hartley Sweeten     2009-04-18  134  {
e06003af56c386 H Hartley Sweeten     2009-04-18  135  	struct ep93xx_keypad_platform_data *pdata = keypad->pdata;
e06003af56c386 H Hartley Sweeten     2009-04-18  136  	unsigned int val = 0;
e06003af56c386 H Hartley Sweeten     2009-04-18  137  
dfb6db007a5699 Arnd Bergmann         2019-04-15  138  	clk_set_rate(keypad->clk, pdata->clk_rate);
e06003af56c386 H Hartley Sweeten     2009-04-18  139  
e06003af56c386 H Hartley Sweeten     2009-04-18  140  	if (pdata->flags & EP93XX_KEYPAD_DISABLE_3_KEY)
e06003af56c386 H Hartley Sweeten     2009-04-18  141  		val |= KEY_INIT_DIS3KY;
e06003af56c386 H Hartley Sweeten     2009-04-18  142  	if (pdata->flags & EP93XX_KEYPAD_DIAG_MODE)
e06003af56c386 H Hartley Sweeten     2009-04-18  143  		val |= KEY_INIT_DIAG;
e06003af56c386 H Hartley Sweeten     2009-04-18  144  	if (pdata->flags & EP93XX_KEYPAD_BACK_DRIVE)
e06003af56c386 H Hartley Sweeten     2009-04-18  145  		val |= KEY_INIT_BACK;
e06003af56c386 H Hartley Sweeten     2009-04-18  146  	if (pdata->flags & EP93XX_KEYPAD_TEST_MODE)
e06003af56c386 H Hartley Sweeten     2009-04-18  147  		val |= KEY_INIT_T2;
e06003af56c386 H Hartley Sweeten     2009-04-18  148  
e06003af56c386 H Hartley Sweeten     2009-04-18  149  	val |= ((pdata->debounce << KEY_INIT_DBNC_SHIFT) & KEY_INIT_DBNC_MASK);
e06003af56c386 H Hartley Sweeten     2009-04-18  150  
e06003af56c386 H Hartley Sweeten     2009-04-18  151  	val |= ((pdata->prescale << KEY_INIT_PRSCL_SHIFT) & KEY_INIT_PRSCL_MASK);
e06003af56c386 H Hartley Sweeten     2009-04-18  152  
60214f058f44cf H Hartley Sweeten     2009-12-15  153  	__raw_writel(val, keypad->mmio_base + KEY_INIT);
e06003af56c386 H Hartley Sweeten     2009-04-18  154  }
e06003af56c386 H Hartley Sweeten     2009-04-18  155  
e06003af56c386 H Hartley Sweeten     2009-04-18  156  static int ep93xx_keypad_open(struct input_dev *pdev)
e06003af56c386 H Hartley Sweeten     2009-04-18  157  {
e06003af56c386 H Hartley Sweeten     2009-04-18 @158  	struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
e06003af56c386 H Hartley Sweeten     2009-04-18  159  
e06003af56c386 H Hartley Sweeten     2009-04-18  160  	if (!keypad->enabled) {
e06003af56c386 H Hartley Sweeten     2009-04-18  161  		ep93xx_keypad_config(keypad);
62e4fe9f608f4e Alexander Sverdlin    2021-06-14  162  		clk_prepare_enable(keypad->clk);
60214f058f44cf H Hartley Sweeten     2009-12-15  163  		keypad->enabled = true;
e06003af56c386 H Hartley Sweeten     2009-04-18  164  	}
e06003af56c386 H Hartley Sweeten     2009-04-18  165  
e06003af56c386 H Hartley Sweeten     2009-04-18  166  	return 0;
e06003af56c386 H Hartley Sweeten     2009-04-18  167  }
e06003af56c386 H Hartley Sweeten     2009-04-18  168  
e06003af56c386 H Hartley Sweeten     2009-04-18  169  static void ep93xx_keypad_close(struct input_dev *pdev)
e06003af56c386 H Hartley Sweeten     2009-04-18  170  {
e06003af56c386 H Hartley Sweeten     2009-04-18 @171  	struct ep93xx_keypad *keypad = input_get_drvdata(pdev);
e06003af56c386 H Hartley Sweeten     2009-04-18  172  
e06003af56c386 H Hartley Sweeten     2009-04-18  173  	if (keypad->enabled) {
62e4fe9f608f4e Alexander Sverdlin    2021-06-14  174  		clk_disable_unprepare(keypad->clk);
60214f058f44cf H Hartley Sweeten     2009-12-15  175  		keypad->enabled = false;
e06003af56c386 H Hartley Sweeten     2009-04-18  176  	}
e06003af56c386 H Hartley Sweeten     2009-04-18  177  }
e06003af56c386 H Hartley Sweeten     2009-04-18  178  
e06003af56c386 H Hartley Sweeten     2009-04-18  179  
03b47b3ad0a9dc Dmitry Torokhov       2021-10-11  180  static int __maybe_unused ep93xx_keypad_suspend(struct device *dev)
e06003af56c386 H Hartley Sweeten     2009-04-18  181  {
b5e9528bd19c6a Dmitry Torokhov       2012-04-11  182  	struct platform_device *pdev = to_platform_device(dev);
e06003af56c386 H Hartley Sweeten     2009-04-18  183  	struct ep93xx_keypad *keypad = platform_get_drvdata(pdev);
e06003af56c386 H Hartley Sweeten     2009-04-18  184  	struct input_dev *input_dev = keypad->input_dev;
e06003af56c386 H Hartley Sweeten     2009-04-18  185  
e06003af56c386 H Hartley Sweeten     2009-04-18 @186  	mutex_lock(&input_dev->mutex);
e06003af56c386 H Hartley Sweeten     2009-04-18  187  
e06003af56c386 H Hartley Sweeten     2009-04-18  188  	if (keypad->enabled) {
e06003af56c386 H Hartley Sweeten     2009-04-18  189  		clk_disable(keypad->clk);
60214f058f44cf H Hartley Sweeten     2009-12-15  190  		keypad->enabled = false;
e06003af56c386 H Hartley Sweeten     2009-04-18  191  	}
e06003af56c386 H Hartley Sweeten     2009-04-18  192  
e06003af56c386 H Hartley Sweeten     2009-04-18  193  	mutex_unlock(&input_dev->mutex);
e06003af56c386 H Hartley Sweeten     2009-04-18  194  
e06003af56c386 H Hartley Sweeten     2009-04-18  195  	return 0;
e06003af56c386 H Hartley Sweeten     2009-04-18  196  }
e06003af56c386 H Hartley Sweeten     2009-04-18  197  
03b47b3ad0a9dc Dmitry Torokhov       2021-10-11  198  static int __maybe_unused ep93xx_keypad_resume(struct device *dev)
e06003af56c386 H Hartley Sweeten     2009-04-18  199  {
b5e9528bd19c6a Dmitry Torokhov       2012-04-11  200  	struct platform_device *pdev = to_platform_device(dev);
e06003af56c386 H Hartley Sweeten     2009-04-18  201  	struct ep93xx_keypad *keypad = platform_get_drvdata(pdev);
e06003af56c386 H Hartley Sweeten     2009-04-18  202  	struct input_dev *input_dev = keypad->input_dev;
e06003af56c386 H Hartley Sweeten     2009-04-18  203  
e06003af56c386 H Hartley Sweeten     2009-04-18 @204  	mutex_lock(&input_dev->mutex);
e06003af56c386 H Hartley Sweeten     2009-04-18  205  
d69f0a43c677e8 Andrzej Pietrasiewicz 2020-10-04 @206  	if (input_device_enabled(input_dev)) {
e06003af56c386 H Hartley Sweeten     2009-04-18  207  		if (!keypad->enabled) {
e06003af56c386 H Hartley Sweeten     2009-04-18  208  			ep93xx_keypad_config(keypad);
e06003af56c386 H Hartley Sweeten     2009-04-18  209  			clk_enable(keypad->clk);
60214f058f44cf H Hartley Sweeten     2009-12-15  210  			keypad->enabled = true;
e06003af56c386 H Hartley Sweeten     2009-04-18  211  		}
e06003af56c386 H Hartley Sweeten     2009-04-18  212  	}
e06003af56c386 H Hartley Sweeten     2009-04-18  213  
e06003af56c386 H Hartley Sweeten     2009-04-18 @214  	mutex_unlock(&input_dev->mutex);
e06003af56c386 H Hartley Sweeten     2009-04-18  215  
e06003af56c386 H Hartley Sweeten     2009-04-18  216  	return 0;
e06003af56c386 H Hartley Sweeten     2009-04-18  217  }
b5e9528bd19c6a Dmitry Torokhov       2012-04-11  218  
b5e9528bd19c6a Dmitry Torokhov       2012-04-11  219  static SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops,
b5e9528bd19c6a Dmitry Torokhov       2012-04-11  220  			 ep93xx_keypad_suspend, ep93xx_keypad_resume);
e06003af56c386 H Hartley Sweeten     2009-04-18  221  
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  222  static void ep93xx_keypad_release_gpio_action(void *_pdev)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  223  {
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  224  	struct platform_device *pdev = _pdev;
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  225  
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  226  	ep93xx_keypad_release_gpio(pdev);
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  227  }
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  228  
5298cc4cc753bb Bill Pemberton        2012-11-23  229  static int ep93xx_keypad_probe(struct platform_device *pdev)
e06003af56c386 H Hartley Sweeten     2009-04-18  230  {
e06003af56c386 H Hartley Sweeten     2009-04-18  231  	struct ep93xx_keypad *keypad;
a5abd95cc0b350 H Hartley Sweeten     2010-01-13  232  	const struct matrix_keymap_data *keymap_data;
e06003af56c386 H Hartley Sweeten     2009-04-18  233  	struct input_dev *input_dev;
60214f058f44cf H Hartley Sweeten     2009-12-15  234  	int err;
e06003af56c386 H Hartley Sweeten     2009-04-18  235  
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  236  	keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL);
60214f058f44cf H Hartley Sweeten     2009-12-15  237  	if (!keypad)
e06003af56c386 H Hartley Sweeten     2009-04-18  238  		return -ENOMEM;
e06003af56c386 H Hartley Sweeten     2009-04-18  239  
c838cb3d477f79 Jingoo Han            2013-12-05  240  	keypad->pdata = dev_get_platdata(&pdev->dev);
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  241  	if (!keypad->pdata)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  242  		return -EINVAL;
e06003af56c386 H Hartley Sweeten     2009-04-18  243  
a5abd95cc0b350 H Hartley Sweeten     2010-01-13  244  	keymap_data = keypad->pdata->keymap_data;
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  245  	if (!keymap_data)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  246  		return -EINVAL;
a5abd95cc0b350 H Hartley Sweeten     2010-01-13  247  
60214f058f44cf H Hartley Sweeten     2009-12-15  248  	keypad->irq = platform_get_irq(pdev, 0);
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  249  	if (keypad->irq < 0)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  250  		return keypad->irq;
e06003af56c386 H Hartley Sweeten     2009-04-18  251  
28e26e927cf4a3 Lv Ruyi               2022-04-20  252  	keypad->mmio_base = devm_platform_ioremap_resource(pdev, 0);
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  253  	if (IS_ERR(keypad->mmio_base))
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  254  		return PTR_ERR(keypad->mmio_base);
e06003af56c386 H Hartley Sweeten     2009-04-18  255  
60214f058f44cf H Hartley Sweeten     2009-12-15  256  	err = ep93xx_keypad_acquire_gpio(pdev);
60214f058f44cf H Hartley Sweeten     2009-12-15  257  	if (err)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  258  		return err;
e06003af56c386 H Hartley Sweeten     2009-04-18  259  
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  260  	err = devm_add_action_or_reset(&pdev->dev,
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  261  				       ep93xx_keypad_release_gpio_action, pdev);
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  262  	if (err)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  263  		return err;
e06003af56c386 H Hartley Sweeten     2009-04-18  264  
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  265  	keypad->clk = devm_clk_get(&pdev->dev, NULL);
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  266  	if (IS_ERR(keypad->clk))
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  267  		return PTR_ERR(keypad->clk);
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  268  
c4be5e5a113d78 Dmitry Torokhov       2021-10-12 @269  	input_dev = devm_input_allocate_device(&pdev->dev);
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  270  	if (!input_dev)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  271  		return -ENOMEM;
e06003af56c386 H Hartley Sweeten     2009-04-18  272  
e06003af56c386 H Hartley Sweeten     2009-04-18  273  	keypad->input_dev = input_dev;
e06003af56c386 H Hartley Sweeten     2009-04-18  274  
e06003af56c386 H Hartley Sweeten     2009-04-18  275  	input_dev->name = pdev->name;
e06003af56c386 H Hartley Sweeten     2009-04-18 @276  	input_dev->id.bustype = BUS_HOST;
e06003af56c386 H Hartley Sweeten     2009-04-18  277  	input_dev->open = ep93xx_keypad_open;
e06003af56c386 H Hartley Sweeten     2009-04-18  278  	input_dev->close = ep93xx_keypad_close;
e06003af56c386 H Hartley Sweeten     2009-04-18  279  
1932811f426fee Dmitry Torokhov       2012-05-10  280  	err = matrix_keypad_build_keymap(keymap_data, NULL,
1932811f426fee Dmitry Torokhov       2012-05-10  281  					 EP93XX_MATRIX_ROWS, EP93XX_MATRIX_COLS,
1932811f426fee Dmitry Torokhov       2012-05-10  282  					 keypad->keycodes, input_dev);
1932811f426fee Dmitry Torokhov       2012-05-10  283  	if (err)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  284  		return err;
e06003af56c386 H Hartley Sweeten     2009-04-18  285  
e06003af56c386 H Hartley Sweeten     2009-04-18  286  	if (keypad->pdata->flags & EP93XX_KEYPAD_AUTOREPEAT)
1932811f426fee Dmitry Torokhov       2012-05-10 @287  		__set_bit(EV_REP, input_dev->evbit);
1932811f426fee Dmitry Torokhov       2012-05-10 @288  	input_set_drvdata(input_dev, keypad);
e06003af56c386 H Hartley Sweeten     2009-04-18  289  
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  290  	err = devm_request_irq(&pdev->dev, keypad->irq,
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  291  			       ep93xx_keypad_irq_handler,
ec4665c46b11f6 Yong Zhang            2011-09-07  292  			       0, pdev->name, keypad);
60214f058f44cf H Hartley Sweeten     2009-12-15  293  	if (err)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  294  		return err;
e06003af56c386 H Hartley Sweeten     2009-04-18  295  
e06003af56c386 H Hartley Sweeten     2009-04-18 @296  	err = input_register_device(input_dev);
60214f058f44cf H Hartley Sweeten     2009-12-15  297  	if (err)
c4be5e5a113d78 Dmitry Torokhov       2021-10-12  298  		return err;
e06003af56c386 H Hartley Sweeten     2009-04-18  299  
1932811f426fee Dmitry Torokhov       2012-05-10  300  	platform_set_drvdata(pdev, keypad);
ab317169673dbd Dmitry Torokhov       2021-10-11  301  
e06003af56c386 H Hartley Sweeten     2009-04-18  302  	device_init_wakeup(&pdev->dev, 1);
ab317169673dbd Dmitry Torokhov       2021-10-11  303  	err = dev_pm_set_wake_irq(&pdev->dev, keypad->irq);
ab317169673dbd Dmitry Torokhov       2021-10-11  304  	if (err)
ab317169673dbd Dmitry Torokhov       2021-10-11  305  		dev_warn(&pdev->dev, "failed to set up wakeup irq: %d\n", err);
e06003af56c386 H Hartley Sweeten     2009-04-18  306  
e06003af56c386 H Hartley Sweeten     2009-04-18  307  	return 0;
e06003af56c386 H Hartley Sweeten     2009-04-18  308  }
e06003af56c386 H Hartley Sweeten     2009-04-18  309  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (241839 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ