From 8ab213a3cfe22ea8c12cc7ad7794928cc7c01549 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Wed, 16 Jul 2014 14:03:10 +0800 Subject: [PATCH] input: keyboard: rk_keys: allow work without any key defined --- drivers/input/keyboard/rk_keys.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/rk_keys.c b/drivers/input/keyboard/rk_keys.c index d70a3778714b..9fc39010406e 100755 --- a/drivers/input/keyboard/rk_keys.c +++ b/drivers/input/keyboard/rk_keys.c @@ -247,7 +247,7 @@ static int rk_keys_parse_dt(struct rk_keys_drvdata *pdata, chan = iio_channel_get(&pdev->dev, NULL); if (IS_ERR(chan)) { - dev_info(&pdev->dev, "Missing io-channels\n"); + dev_info(&pdev->dev, "no io-channels defined\n"); chan = NULL; } pdata->chan = chan; @@ -312,10 +312,8 @@ static int keys_probe(struct platform_device *pdev) int wakeup, key_num = 0; key_num = of_get_child_count(np); - if (key_num == 0) { - error = -ENODEV; - return error; - } + if (key_num == 0) + dev_info(&pdev->dev, "no key defined\n"); ddata = devm_kzalloc(dev, sizeof(struct rk_keys_drvdata) + key_num * sizeof(struct rk_keys_button), -- 2.34.1