* [PATCH v1] Input: mpr121 - Switch to use device_property_count_u32()
@ 2019-06-17 11:51 Andy Shevchenko
2019-06-17 12:08 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2019-06-17 11:51 UTC (permalink / raw)
To: Mark Brown, linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki
Cc: Andy Shevchenko
Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/input/keyboard/mpr121_touchkey.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c
index 884a74d8a7ed..1119db6dbca5 100644
--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -257,8 +257,7 @@ static int mpr_touchkey_probe(struct i2c_client *client,
mpr121->client = client;
mpr121->input_dev = input_dev;
- mpr121->keycount = device_property_read_u32_array(dev, "linux,keycodes",
- NULL, 0);
+ mpr121->keycount = device_property_count_u32(dev, "linux,keycodes");
if (mpr121->keycount > MPR121_MAX_KEY_COUNT) {
dev_err(dev, "too many keys defined (%d)\n", mpr121->keycount);
return -EINVAL;
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] Input: mpr121 - Switch to use device_property_count_u32()
2019-06-17 11:51 [PATCH v1] Input: mpr121 - Switch to use device_property_count_u32() Andy Shevchenko
@ 2019-06-17 12:08 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2019-06-17 12:08 UTC (permalink / raw)
To: Mark Brown, linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki
On Mon, Jun 17, 2019 at 02:51:06PM +0300, Andy Shevchenko wrote:
> Use use device_property_count_u32() directly, that makes code neater.
Wrong patch has been sent, please ignore.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-17 12:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 11:51 [PATCH v1] Input: mpr121 - Switch to use device_property_count_u32() Andy Shevchenko
2019-06-17 12:08 ` Andy Shevchenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.