aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sony.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2013-11-19 14:26:28 -0500
committerJiri Kosina <jkosina@suse.cz>2013-11-20 03:59:17 -0500
commit92b5c411ab3a3441ccbf2053bc4b00eca6cc8c96 (patch)
tree4a87db067c0058c2ba3de4b49964e6d07bf2a88b /drivers/hid/hid-sony.c
parent9316e58076f47bd242c3700d6f4aa1563fdb7192 (diff)
HID: sony: Rename rumble_* functions/variables to state_*
The commands used to modify the rumble motor state also modifies the LEDs at the same time. The functionality used to modify this state in the driver has to be shared between the rumble and LED part. It is therefore better to replace the "rumble" part of the names with "state". Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-sony.c')
-rw-r--r--drivers/hid/hid-sony.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 098af2f84b8c..28b847ad5458 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -226,7 +226,7 @@ struct sony_sc {
226 unsigned long quirks; 226 unsigned long quirks;
227 227
228#ifdef CONFIG_SONY_FF 228#ifdef CONFIG_SONY_FF
229 struct work_struct rumble_worker; 229 struct work_struct state_worker;
230 struct hid_device *hdev; 230 struct hid_device *hdev;
231 __u8 left; 231 __u8 left;
232 __u8 right; 232 __u8 right;
@@ -622,9 +622,9 @@ static void buzz_remove(struct hid_device *hdev)
622} 622}
623 623
624#ifdef CONFIG_SONY_FF 624#ifdef CONFIG_SONY_FF
625static void sony_rumble_worker(struct work_struct *work) 625static void sony_state_worker(struct work_struct *work)
626{ 626{
627 struct sony_sc *sc = container_of(work, struct sony_sc, rumble_worker); 627 struct sony_sc *sc = container_of(work, struct sony_sc, state_worker);
628 unsigned char buf[] = { 628 unsigned char buf[] = {
629 0x01, 629 0x01,
630 0x00, 0xff, 0x00, 0xff, 0x00, 630 0x00, 0xff, 0x00, 0xff, 0x00,
@@ -655,7 +655,7 @@ static int sony_play_effect(struct input_dev *dev, void *data,
655 sc->left = effect->u.rumble.strong_magnitude / 256; 655 sc->left = effect->u.rumble.strong_magnitude / 256;
656 sc->right = effect->u.rumble.weak_magnitude ? 1 : 0; 656 sc->right = effect->u.rumble.weak_magnitude ? 1 : 0;
657 657
658 schedule_work(&sc->rumble_worker); 658 schedule_work(&sc->state_worker);
659 return 0; 659 return 0;
660} 660}
661 661
@@ -667,7 +667,7 @@ static int sony_init_ff(struct hid_device *hdev)
667 struct sony_sc *sc = hid_get_drvdata(hdev); 667 struct sony_sc *sc = hid_get_drvdata(hdev);
668 668
669 sc->hdev = hdev; 669 sc->hdev = hdev;
670 INIT_WORK(&sc->rumble_worker, sony_rumble_worker); 670 INIT_WORK(&sc->state_worker, sony_state_worker);
671 671
672 input_set_capability(input_dev, EV_FF, FF_RUMBLE); 672 input_set_capability(input_dev, EV_FF, FF_RUMBLE);
673 return input_ff_create_memless(input_dev, NULL, sony_play_effect); 673 return input_ff_create_memless(input_dev, NULL, sony_play_effect);
@@ -677,7 +677,7 @@ static void sony_destroy_ff(struct hid_device *hdev)
677{ 677{
678 struct sony_sc *sc = hid_get_drvdata(hdev); 678 struct sony_sc *sc = hid_get_drvdata(hdev);
679 679
680 cancel_work_sync(&sc->rumble_worker); 680 cancel_work_sync(&sc->state_worker);
681} 681}
682 682
683#else 683#else