diff mbox series

[v1] Input: mpr121 - Switch to use device_property_count_u32()

Message ID 20190723173800.66553-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Mainlined
Commit 6e57ce76d0622aa4d790edd8e49f3704c48707c9
Headers show
Series [v1] Input: mpr121 - Switch to use device_property_count_u32() | expand

Commit Message

Andy Shevchenko July 23, 2019, 5:38 p.m. UTC
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(-)

Comments

Dmitry Torokhov July 28, 2019, 10 a.m. UTC | #1
Hi Andy,

On Tue, Jul 23, 2019 at 08:38:00PM +0300, Andy Shevchenko wrote:
> Use use device_property_count_u32() directly, that makes code neater.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Please ping me if you do not see it in the tree by rc5. I'll sync with
upstream to pull in this new API around rc4.

Thanks.
Dmitry Torokhov Aug. 12, 2019, 7:01 a.m. UTC | #2
On Sun, Jul 28, 2019 at 01:00:38PM +0300, Dmitry Torokhov wrote:
> Hi Andy,
> 
> On Tue, Jul 23, 2019 at 08:38:00PM +0300, Andy Shevchenko wrote:
> > Use use device_property_count_u32() directly, that makes code neater.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Please ping me if you do not see it in the tree by rc5. I'll sync with
> upstream to pull in this new API around rc4.

Applied the lot, thank you.
diff mbox series

Patch

diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c
index e9ceaa16b46a..ee80de44ce3f 100644
--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -253,8 +253,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;