浏览代码

Input: twl4030-pwrbutton - use input_set_capability() helper

Cleanup driver slightly by using input_set_capability() instead
of manually setting the required bits.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Sebastian Reichel 8 年之前
父节点
当前提交
61e29ec1c9
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/input/misc/twl4030-pwrbutton.c

+ 1 - 2
drivers/input/misc/twl4030-pwrbutton.c

@@ -64,8 +64,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 
-	pwr->evbit[0] = BIT_MASK(EV_KEY);
-	pwr->keybit[BIT_WORD(KEY_POWER)] = BIT_MASK(KEY_POWER);
+	input_set_capability(pwr, EV_KEY, KEY_POWER);
 	pwr->name = "twl4030_pwrbutton";
 	pwr->phys = "twl4030_pwrbutton/input0";
 	pwr->dev.parent = &pdev->dev;