diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-12-15 23:32:42 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-12-15 23:32:42 -0500 |
| commit | f20c86cd75f1c8c728dafd0218645ff3c5e8545d (patch) | |
| tree | b9100463df79eeafbef87a0bbbaaba4740313120 /drivers | |
| parent | a1f9a4072655843fc03186acbad65990cc05dd2d (diff) | |
| parent | 1d6a01365fd63fbf7c2709a183e2936728c8efad (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 3.19.
Diffstat (limited to 'drivers')
71 files changed, 4850 insertions, 911 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index e29c04e2aff4..e853a2134680 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
| @@ -527,14 +527,14 @@ EXPORT_SYMBOL(gameport_set_phys); | |||
| 527 | */ | 527 | */ |
| 528 | static void gameport_init_port(struct gameport *gameport) | 528 | static void gameport_init_port(struct gameport *gameport) |
| 529 | { | 529 | { |
| 530 | static atomic_t gameport_no = ATOMIC_INIT(0); | 530 | static atomic_t gameport_no = ATOMIC_INIT(-1); |
| 531 | 531 | ||
| 532 | __module_get(THIS_MODULE); | 532 | __module_get(THIS_MODULE); |
| 533 | 533 | ||
| 534 | mutex_init(&gameport->drv_mutex); | 534 | mutex_init(&gameport->drv_mutex); |
| 535 | device_initialize(&gameport->dev); | 535 | device_initialize(&gameport->dev); |
| 536 | dev_set_name(&gameport->dev, "gameport%lu", | 536 | dev_set_name(&gameport->dev, "gameport%lu", |
| 537 | (unsigned long)atomic_inc_return(&gameport_no) - 1); | 537 | (unsigned long)atomic_inc_return(&gameport_no)); |
| 538 | gameport->dev.bus = &gameport_bus; | 538 | gameport->dev.bus = &gameport_bus; |
| 539 | gameport->dev.release = gameport_release_port; | 539 | gameport->dev.release = gameport_release_port; |
| 540 | if (gameport->parent) | 540 | if (gameport->parent) |
diff --git a/drivers/input/input.c b/drivers/input/input.c index 0f175f55782b..04217c2e345c 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
| @@ -1775,7 +1775,7 @@ EXPORT_SYMBOL_GPL(input_class); | |||
| 1775 | */ | 1775 | */ |
| 1776 | struct input_dev *input_allocate_device(void) | 1776 | struct input_dev *input_allocate_device(void) |
| 1777 | { | 1777 | { |
| 1778 | static atomic_t input_no = ATOMIC_INIT(0); | 1778 | static atomic_t input_no = ATOMIC_INIT(-1); |
| 1779 | struct input_dev *dev; | 1779 | struct input_dev *dev; |
| 1780 | 1780 | ||
| 1781 | dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL); | 1781 | dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL); |
| @@ -1790,7 +1790,7 @@ struct input_dev *input_allocate_device(void) | |||
| 1790 | INIT_LIST_HEAD(&dev->node); | 1790 | INIT_LIST_HEAD(&dev->node); |
| 1791 | 1791 | ||
| 1792 | dev_set_name(&dev->dev, "input%lu", | 1792 | dev_set_name(&dev->dev, "input%lu", |
| 1793 | (unsigned long) atomic_inc_return(&input_no) - 1); | 1793 | (unsigned long)atomic_inc_return(&input_no)); |
| 1794 | 1794 | ||
| 1795 | __module_get(THIS_MODULE); | 1795 | __module_get(THIS_MODULE); |
| 1796 | } | 1796 | } |
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index fc55f0d15b70..3aa2f3f3da5b 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
| @@ -886,8 +886,8 @@ static void xpad_led_set(struct led_classdev *led_cdev, | |||
| 886 | 886 | ||
| 887 | static int xpad_led_probe(struct usb_xpad *xpad) | 887 | static int xpad_led_probe(struct usb_xpad *xpad) |
| 888 | { | 888 | { |
| 889 | static atomic_t led_seq = ATOMIC_INIT(0); | 889 | static atomic_t led_seq = ATOMIC_INIT(-1); |
| 890 | long led_no; | 890 | unsigned long led_no; |
| 891 | struct xpad_led *led; | 891 | struct xpad_led *led; |
| 892 | struct led_classdev *led_cdev; | 892 | struct led_classdev *led_cdev; |
| 893 | int error; | 893 | int error; |
| @@ -899,9 +899,9 @@ static int xpad_led_probe(struct usb_xpad *xpad) | |||
| 899 | if (!led) | 899 | if (!led) |
| 900 | return -ENOMEM; | 900 | return -ENOMEM; |
| 901 | 901 | ||
| 902 | led_no = (long)atomic_inc_return(&led_seq) - 1; | 902 | led_no = atomic_inc_return(&led_seq); |
| 903 | 903 | ||
| 904 | snprintf(led->name, sizeof(led->name), "xpad%ld", led_no); | 904 | snprintf(led->name, sizeof(led->name), "xpad%lu", led_no); |
| 905 | led->xpad = xpad; | 905 | led->xpad = xpad; |
| 906 | |||
