From patchwork Mon Nov 18 20:42:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 3199071 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C7C12C045C for ; Mon, 18 Nov 2013 20:43:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7FB42034A for ; Mon, 18 Nov 2013 20:43:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B5DBE2026D for ; Mon, 18 Nov 2013 20:43:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730Ab3KRUnX (ORCPT ); Mon, 18 Nov 2013 15:43:23 -0500 Received: from narfation.org ([79.140.41.39]:42173 "EHLO v3-1039.vlinux.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751561Ab3KRUnW (ORCPT ); Mon, 18 Nov 2013 15:43:22 -0500 Received: from sven-desktop.home.narfation.org (drsd-4dbda99b.pool.mediaWays.net [77.189.169.155]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 934AD1100BD; Mon, 18 Nov 2013 21:43:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=20121; t=1384807401; bh=7C2A7W1xxbV9DsExUijxlbFbEigt6LYAtHoj0azmTTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SmeWxozO4QknundFsQhfhXoanjMzFEowkj0KNNbtGSxJ0nMPM6KTwT615QGfyRA6n DY3u0eEqCsLQPml+hOJDmMQPfhdjXlbSOCvKvrhryZJS1/kiP/gnczY8QyMYOKLMz6 GoBQEzTePjnkUpP6zgu0MiRvMuNnTN4/7bJQ2U0I= From: Sven Eckelmann To: linux-input@vger.kernel.org Cc: Jiri Kosina , Colin Leitner , Sven Eckelmann Subject: [PATCHv3 3/5] HID: sony: Rename buzz_* functions to sony_led_* Date: Mon, 18 Nov 2013 21:42:34 +0100 Message-Id: <1384807356-15561-4-git-send-email-sven@narfation.org> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1384807356-15561-1-git-send-email-sven@narfation.org> References: <1384807356-15561-1-git-send-email-sven@narfation.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/hid/hid-sony.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 0677292..cdb2419 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);