提交 aa45590a 编写于 作者: G Guenter Roeck 提交者: Dmitry Torokhov

Input: soc_button_array - use 'dev' instead of dereferencing it

Use local variable 'dev' instead of dereferencing it several times.
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 9e85aa69
...@@ -167,12 +167,12 @@ static int soc_button_probe(struct platform_device *pdev) ...@@ -167,12 +167,12 @@ static int soc_button_probe(struct platform_device *pdev)
button_info = (struct soc_button_info *)id->driver_data; button_info = (struct soc_button_info *)id->driver_data;
if (gpiod_count(&pdev->dev, KBUILD_MODNAME) <= 0) { if (gpiod_count(dev, KBUILD_MODNAME) <= 0) {
dev_dbg(&pdev->dev, "no GPIO attached, ignoring...\n"); dev_dbg(dev, "no GPIO attached, ignoring...\n");
return -ENODEV; return -ENODEV;
} }
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv) if (!priv)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册