diff options
author | Sven Eckelmann <sven@narfation.org> | 2013-11-19 14:26:30 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-11-20 03:59:18 -0500 |
commit | c53825190ac58d44d6ade6c6e6c8ad22f77ff954 (patch) | |
tree | 5fca6a15c1db69e0f100a0b12e89487d71d90e84 /drivers/hid | |
parent | f1c458caa11430d30b3beae72d8ec9dfdce9c3ac (diff) |
HID: sony: Rename buzz_* functions to sony_led_*
More controllers managed by the hid-sony module have 4 LEDs. These can share
most of the functionality provided by the buzz functions.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-sony.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 067729290012..cdb24192db96 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
@@ -466,7 +466,7 @@ static void buzz_set_leds(struct hid_device *hdev, int leds) | |||
466 | hid_hw_request(hdev, report, HID_REQ_SET_REPORT); | 466 | hid_hw_request(hdev, report, HID_REQ_SET_REPORT); |
467 | } | 467 | } |
468 | 468 | ||
469 | static void buzz_led_set_brightness(struct led_classdev *led, | 469 | static void sony_led_set_brightness(struct led_classdev *led, |
470 | enum led_brightness value) | 470 | enum led_brightness value) |
471 | { | 471 | { |
472 | struct device *dev = led->dev->parent; | 472 | struct device *dev = led->dev->parent; |
@@ -498,7 +498,7 @@ static void buzz_led_set_brightness(struct led_classdev *led, | |||
498 | } | 498 | } |
499 | } | 499 | } |
500 | 500 | ||
501 | static enum led_brightness buzz_led_get_brightness(struct led_classdev *led) | 501 | static enum led_brightness sony_led_get_brightness(struct led_classdev *led) |
502 | { | 502 | { |
503 | struct device *dev = led->dev->parent; | 503 | struct device *dev = led->dev->parent; |
504 | struct hid_device *hdev = container_of(dev, struct hid_device, dev); | 504 | struct hid_device *hdev = container_of(dev, struct hid_device, dev); |
@@ -525,7 +525,7 @@ static enum led_brightness buzz_led_get_brightness(struct led_classdev *led) | |||
525 | return on ? LED_FULL : LED_OFF; | 525 | return on ? LED_FULL : LED_OFF; |
526 | } | 526 | } |
527 | 527 | ||
528 | static int buzz_init(struct hid_device *hdev) | 528 | static int sony_leds_init(struct hid_device *hdev) |
529 | { | 529 | { |
530 | struct sony_sc *drv_data; | 530 | struct sony_sc *drv_data; |
531 | struct buzz_extra *buzz; | 531 | struct buzz_extra *buzz; |
@@ -567,8 +567,8 @@ static int buzz_init(struct hid_device *hdev) | |||
567 | led->name = name; | 567 | led->name = name; |
568 | led->brightness = 0; | 568 | led->brightness = 0; |
569 | led->max_brightness = 1; | 569 | led->max_brightness = 1; |
570 | led->brightness_get = buzz_led_get_brightness; | 570 | led->brightness_get = sony_led_get_brightness; |
571 | led->brightness_set = buzz_led_set_brightness; | 571 | led->brightness_set = sony_led_set_brightness; |
572 | 572 | ||
573 | if (led_classdev_register(&hdev->dev, led)) { | 573 | if (led_classdev_register(&hdev->dev, led)) { |
574 | hid_err(hdev, "Failed to register LED %d\n", n); | 574 | hid_err(hdev, "Failed to register LED %d\n", n); |
@@ -596,7 +596,7 @@ error_leds: | |||
596 | return ret; | 596 | return ret; |
597 | } | 597 | } |
598 | 598 | ||
599 | static void buzz_remove(struct hid_device *hdev) | 599 | static void sony_leds_remove(struct hid_device *hdev) |
600 | { | 600 | { |
601 | struct sony_sc *drv_data; | 601 | struct sony_sc *drv_data; |
602 | struct buzz_extra *buzz; | 602 | struct buzz_extra *buzz; |
@@ -733,7 +733,7 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
733 | else if (sc->quirks & SIXAXIS_CONTROLLER_BT) | 733 | else if (sc->quirks & SIXAXIS_CONTROLLER_BT) |
734 | ret = sixaxis_set_operational_bt(hdev); | 734 | ret = sixaxis_set_operational_bt(hdev); |
735 | else if (sc->quirks & BUZZ_CONTROLLER) | 735 | else if (sc->quirks & BUZZ_CONTROLLER) |
736 | ret = buzz_init(hdev); | 736 | ret = sony_leds_init(hdev); |
737 | else | 737 | else |
738 | ret = 0; | 738 | ret = 0; |
739 | 739 | ||
@@ -755,7 +755,7 @@ static void sony_remove(struct hid_device *hdev) | |||
755 | struct sony_sc *sc = hid_get_drvdata(hdev); | 755 | struct sony_sc *sc = hid_get_drvdata(hdev); |
756 | 756 | ||
757 | if (sc->quirks & BUZZ_CONTROLLER) | 757 | if (sc->quirks & BUZZ_CONTROLLER) |
758 | buzz_remove(hdev); | 758 | sony_leds_remove(hdev); |
759 | 759 | ||
760 | sony_destroy_ff(hdev); | 760 | sony_destroy_ff(hdev); |
761 | 761 | ||