summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2013-11-19 20:26:30 +0100
committerJiri Kosina <jkosina@suse.cz>2013-11-20 09:59:18 +0100
commitc53825190ac58d44d6ade6c6e6c8ad22f77ff954 (patch)
tree5fca6a15c1db69e0f100a0b12e89487d71d90e84
parentf1c458caa11430d30b3beae72d8ec9dfdce9c3ac (diff)
downloadblackbird-op-linux-c53825190ac58d44d6ade6c6e6c8ad22f77ff954.tar.gz
blackbird-op-linux-c53825190ac58d44d6ade6c6e6c8ad22f77ff954.zip
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>
-rw-r--r--drivers/hid/hid-sony.c16
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)
hid_hw_request(hdev, report, HID_REQ_SET_REPORT);
}
-static void buzz_led_set_brightness(struct led_classdev *led,
+static void sony_led_set_brightness(struct led_classdev *led,
enum led_brightness value)
{
struct device *dev = led->dev->parent;
@@ -498,7 +498,7 @@ static void buzz_led_set_brightness(struct led_classdev *led,
}
}
-static enum led_brightness buzz_led_get_brightness(struct led_classdev *led)
+static enum led_brightness sony_led_get_brightness(struct led_classdev *led)
{
struct device *dev = led->dev->parent;
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)
return on ? LED_FULL : LED_OFF;
}
-static int buzz_init(struct hid_device *hdev)
+static int sony_leds_init(struct hid_device *hdev)
{
struct sony_sc *drv_data;
struct buzz_extra *buzz;
@@ -567,8 +567,8 @@ static int buzz_init(struct hid_device *hdev)
led->name = name;
led->brightness = 0;
led->max_brightness = 1;
- led->brightness_get = buzz_led_get_brightness;
- led->brightness_set = buzz_led_set_brightness;
+ led->brightness_get = sony_led_get_brightness;
+ led->brightness_set = sony_led_set_brightness;
if (led_classdev_register(&hdev->dev, led)) {
hid_err(hdev, "Failed to register LED %d\n", n);
@@ -596,7 +596,7 @@ error_leds:
return ret;
}
-static void buzz_remove(struct hid_device *hdev)
+static void sony_leds_remove(struct hid_device *hdev)
{
struct sony_sc *drv_data;
struct buzz_extra *buzz;
@@ -733,7 +733,7 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
else if (sc->quirks & SIXAXIS_CONTROLLER_BT)
ret = sixaxis_set_operational_bt(hdev);
else if (sc->quirks & BUZZ_CONTROLLER)
- ret = buzz_init(hdev);
+ ret = sony_leds_init(hdev);
else
ret = 0;
@@ -755,7 +755,7 @@ static void sony_remove(struct hid_device *hdev)
struct sony_sc *sc = hid_get_drvdata(hdev);
if (sc->quirks & BUZZ_CONTROLLER)
- buzz_remove(hdev);
+ sony_leds_remove(hdev);
sony_destroy_ff(hdev);
OpenPOWER on IntegriCloud