From patchwork Thu Sep 13 06:10:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: axel lin X-Patchwork-Id: 1450241 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9707CDF24C for ; Thu, 13 Sep 2012 06:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751161Ab2IMGKk (ORCPT ); Thu, 13 Sep 2012 02:10:40 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:65505 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146Ab2IMGKj (ORCPT ); Thu, 13 Sep 2012 02:10:39 -0400 Received: by obbuo13 with SMTP id uo13so3971425obb.19 for ; Wed, 12 Sep 2012 23:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:x-mailer:content-transfer-encoding:mime-version; bh=cgof+s5VBhkc/8xB8NXphBA9RfDdp8iaIEyVANqiins=; b=tQ3MMU3whJKGeRsVIANwA5R1nUGGePMxAttubz6Hvg+LFgeAiuwVy/QYuVG8jhkq2v 9gwvkWvrJCl+7LL/0jmq21AAPA7d2rt4HOuyPQ3ODBzJrDoR58uIdT8Xz6AwPOUHMWdK Kh7pEVeoOFRcH+W9rdbYVe3xZFUrccdmsvtZ9B7+AVDCtJGE09HwdIDW7SyYFXiMEUNq MOvtoxqQbdGbxjTDIDuAL5sYx6mfzXjC8Itf+5m/FCjwEfN5luo96CG63gEtw6u/P27B iNhEA8E3wlt3UT0EBI/d8p6Cwn4mVXVw6U4tFBtrJR39dO/tVKZx05rmY9ytanAfpHDm cOPg== Received: by 10.60.7.99 with SMTP id i3mr698713oea.86.1347516638610; Wed, 12 Sep 2012 23:10:38 -0700 (PDT) Received: from [218.173.173.81] (218-173-173-81.dynamic.hinet.net. [218.173.173.81]) by mx.google.com with ESMTPS id l10sm18567122oeb.13.2012.09.12.23.10.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 23:10:38 -0700 (PDT) Message-ID: <1347516634.3319.4.camel@phoenix> Subject: [PATCH 3/4] HID: prodikeys: Remove unnecessary casts of void pointers From: Axel Lin To: Jiri Kosina Cc: Don Prince , linux-input@vger.kernel.org Date: Thu, 13 Sep 2012 14:10:34 +0800 In-Reply-To: <1347516512.3319.2.camel@phoenix> References: <1347516512.3319.2.camel@phoenix> X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Signed-off-by: Axel Lin --- drivers/hid/hid-prodikeys.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index b71b77a..ec8ca33 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c @@ -105,7 +105,7 @@ static ssize_t show_channel(struct device *dev, struct device_attribute *attr, char *buf) { struct hid_device *hdev = container_of(dev, struct hid_device, dev); - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); dbg_hid("pcmidi sysfs read channel=%u\n", pk->pm->midi_channel); @@ -118,7 +118,7 @@ static ssize_t store_channel(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct hid_device *hdev = container_of(dev, struct hid_device, dev); - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); unsigned channel = 0; @@ -142,7 +142,7 @@ static ssize_t show_sustain(struct device *dev, struct device_attribute *attr, char *buf) { struct hid_device *hdev = container_of(dev, struct hid_device, dev); - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); dbg_hid("pcmidi sysfs read sustain=%u\n", pk->pm->midi_sustain); @@ -155,7 +155,7 @@ static ssize_t store_sustain(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct hid_device *hdev = container_of(dev, struct hid_device, dev); - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); unsigned sustain = 0; @@ -181,7 +181,7 @@ static ssize_t show_octave(struct device *dev, struct device_attribute *attr, char *buf) { struct hid_device *hdev = container_of(dev, struct hid_device, dev); - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); dbg_hid("pcmidi sysfs read octave=%d\n", pk->pm->midi_octave); @@ -194,7 +194,7 @@ static ssize_t store_octave(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct hid_device *hdev = container_of(dev, struct hid_device, dev); - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); int octave = 0; @@ -759,7 +759,7 @@ static int pk_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); struct pcmidi_snd *pm; pm = pk->pm; @@ -777,7 +777,7 @@ static int pk_input_mapping(struct hid_device *hdev, struct hid_input *hi, static int pk_raw_event(struct hid_device *hdev, struct hid_report *report, u8 *data, int size) { - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); int ret = 0; if (1 == pk->pm->ifnum) { @@ -858,7 +858,7 @@ err_free_pk: static void pk_remove(struct hid_device *hdev) { - struct pk_device *pk = (struct pk_device *)hid_get_drvdata(hdev); + struct pk_device *pk = hid_get_drvdata(hdev); struct pcmidi_snd *pm; pm = pk->pm;