Skip to content

Commit

Permalink
Input: gpio-keys - add support for setting device name
Browse files Browse the repository at this point in the history
This patch allows to set a device name which helps distinguishing several
gpio-keys devices.

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Alexander Stein authored and Dmitry Torokhov committed Apr 12, 2011
1 parent 92a4767 commit 4671127
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ static int __devinit gpio_keys_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ddata);
input_set_drvdata(input, ddata);

input->name = pdev->name;
input->name = pdata->name ? : pdev->name;
input->phys = "gpio-keys/input0";
input->dev.parent = &pdev->dev;
input->open = gpio_keys_open;
Expand Down
1 change: 1 addition & 0 deletions include/linux/gpio_keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ struct gpio_keys_platform_data {
unsigned int rep:1; /* enable input subsystem auto repeat */
int (*enable)(struct device *dev);
void (*disable)(struct device *dev);
const char *name; /* input device name */
};

#endif

0 comments on commit 4671127

Please sign in to comment.