From patchwork Wed Dec 12 21:04:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Pandruvada, Srinivas" X-Patchwork-Id: 205659 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pa0-f57.google.com (mail-pa0-f57.google.com [209.85.220.57]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id A61EF2C0084 for ; Thu, 13 Dec 2012 08:04:39 +1100 (EST) Received: by mail-pa0-f57.google.com with SMTP id bh2sf729282pad.12 for ; Wed, 12 Dec 2012 13:04:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:received-spf:x-extloop1:x-ironport-av:from:to:cc :subject:thread-topic:thread-index:date:message-id:references :in-reply-to:accept-language:x-ms-has-attach:x-ms-tnef-correlator :x-originating-ip:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-language:content-type; bh=YykrnHVjPfR8THhMlQrMMJGc3NBs5iVcycp/3PtBDGo=; b=RdZprGBC8ScU9MNdEjHE27IdPdAdFuGTwruTdZcBCga3mMLjIa/CyWBrMwOF4IOe2X tNUjFxPSpvjEjeCHHM8etkI//WMjCA8ckeCy8CEn7i7YkP3iIynjvCLKmU8Luy+hgaxo IJUSQ60vqOk7WRwEaGm143D6jcXo+6pyhPlBtxr6riZlbIRnLiX52H6U/NByQUsCC1JD bBeaefs4ZhRYbgvloDvMn7w7aFuofp/sFEauBK1cTHVfCOylK6Oe6H/UWMyDlvGW3/VP vGh220DbOJ9Xoj8wBSIZi+9HySf0E70McwfDk4KZ8/wn3BlOV3v7oQlKoPVtYbGu0qOJ SDpw== Received: by 10.182.89.101 with SMTP id bn5mr135440obb.35.1355346276601; Wed, 12 Dec 2012 13:04:36 -0800 (PST) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.182.245.41 with SMTP id xl9ls13679obc.74.gmail; Wed, 12 Dec 2012 13:04:36 -0800 (PST) Received: by 10.66.86.102 with SMTP id o6mr757812paz.41.1355346276080; Wed, 12 Dec 2012 13:04:36 -0800 (PST) Received: by 10.66.86.102 with SMTP id o6mr757811paz.41.1355346276066; Wed, 12 Dec 2012 13:04:36 -0800 (PST) Received: from mga09.intel.com (mga09.intel.com. [134.134.136.24]) by gmr-mx.google.com with ESMTP id e1si540118paz.0.2012.12.12.13.04.35; Wed, 12 Dec 2012 13:04:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of srinivas.pandruvada@intel.com designates 134.134.136.24 as permitted sender) client-ip=134.134.136.24; Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 12 Dec 2012 13:03:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,269,1355126400"; d="scan'208";a="256613778" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga002.jf.intel.com with ESMTP; 12 Dec 2012 13:04:35 -0800 Received: from orsmsx108.amr.corp.intel.com ([169.254.9.188]) by ORSMSX102.amr.corp.intel.com ([169.254.1.125]) with mapi id 14.01.0355.002; Wed, 12 Dec 2012 13:04:35 -0800 From: "Pandruvada, Srinivas" To: Alexander Holler , "linux-kernel@vger.kernel.org" CC: "linux-iio@vger.kernel.org" , Jonathan Cameron , Lars-Peter Clausen , "rtc-linux@googlegroups.com" , Alessandro Zummo , Andrew Morton Subject: [rtc-linux] RE: [PATCHi 5/4] hid: iio: rename struct hid_sensor_iio_common to hid_sensor_common Thread-Topic: [PATCHi 5/4] hid: iio: rename struct hid_sensor_iio_common to hid_sensor_common Thread-Index: AQHN2KgGren2jRu+gUyFIpBQpQH495gVpzLQ Date: Wed, 12 Dec 2012 21:04:34 +0000 Message-ID: <4FA419E87744DF4DAECD5BCE1214B7A91C960CDA@ORSMSX108.amr.corp.intel.com> References: <50C8E49C.70106@ahsoftware.de> <1355344082-15038-1-git-send-email-holler@ahsoftware.de> In-Reply-To: <1355344082-15038-1-git-send-email-holler@ahsoftware.de> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.140] MIME-Version: 1.0 X-Original-Sender: srinivas.pandruvada@intel.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of srinivas.pandruvada@intel.com designates 134.134.136.24 as permitted sender) smtp.mail=srinivas.pandruvada@intel.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Language: en-US Looks good. -----Original Message----- From: Alexander Holler [mailto:holler@ahsoftware.de] Sent: Wednesday, December 12, 2012 12:28 PM To: linux-kernel@vger.kernel.org Cc: linux-iio@vger.kernel.org; Jonathan Cameron; Lars-Peter Clausen; rtc-linux@googlegroups.com; Alessandro Zummo; Pandruvada, Srinivas; Andrew Morton; Alexander Holler Subject: [PATCHi 5/4] hid: iio: rename struct hid_sensor_iio_common to hid_sensor_common The structure with common attributes for hid-sensors isn't specific to the iio-subsystem, so rename it to hid_sensor_common. Signed-off-by: Alexander Holler Signed-off-by: Srinivas Pandruvada --- drivers/iio/accel/hid-sensor-accel-3d.c | 2 +- .../iio/common/hid-sensors/hid-sensor-attributes.c | 10 +++++----- .../iio/common/hid-sensors/hid-sensor-trigger.c | 4 ++-- .../iio/common/hid-sensors/hid-sensor-trigger.h | 2 +- drivers/iio/gyro/hid-sensor-gyro-3d.c | 2 +- drivers/iio/light/hid-sensor-als.c | 2 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 2 +- drivers/rtc/rtc-hid-sensor-time.c | 2 +- include/linux/hid-sensor-hub.h | 12 ++++++------ 9 files changed, 19 insertions(+), 19 deletions(-) -- 1.7.8.6 diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c index 72371aa..2133da8 100644 --- a/drivers/iio/accel/hid-sensor-accel-3d.c +++ b/drivers/iio/accel/hid-sensor-accel-3d.c @@ -43,7 +43,7 @@ enum accel_3d_channel { struct accel_3d_state { struct hid_sensor_hub_callbacks callbacks; - struct hid_sensor_iio_common common_attributes; + struct hid_sensor_common common_attributes; struct hid_sensor_hub_attribute_info accel[ACCEL_3D_CHANNEL_MAX]; u32 accel_val[ACCEL_3D_CHANNEL_MAX]; }; diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c index 5873f16..75b5473 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c @@ -113,7 +113,7 @@ static u32 convert_to_vtf_format(int size, int exp, int val1, int val2) return value; } -int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st, +int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st, int *val1, int *val2) { s32 value; @@ -140,7 +140,7 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st, } EXPORT_SYMBOL(hid_sensor_read_samp_freq_value); -int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st, +int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st, int val1, int val2) { s32 value; @@ -168,7 +168,7 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st, } EXPORT_SYMBOL(hid_sensor_write_samp_freq_value); -int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st, +int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st, int *val1, int *val2) { s32 value; @@ -190,7 +190,7 @@ int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st, } EXPORT_SYMBOL(hid_sensor_read_raw_hyst_value); -int hid_sensor_write_raw_hyst_value(struct hid_sensor_iio_common *st, +int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st, int val1, int val2) { s32 value; @@ -211,7 +211,7 @@ EXPORT_SYMBOL(hid_sensor_write_raw_hyst_value); int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev, u32 usage_id, - struct hid_sensor_iio_common *st) + struct hid_sensor_common *st) { sensor_hub_input_get_attribute_info(hsdev, diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c index b097b68..58fc108 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c @@ -31,7 +31,7 @@ static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig, bool state) { - struct hid_sensor_iio_common *st = trig->private_data; + struct hid_sensor_common *st = trig->private_data; int state_val; state_val = state ? 1 : 0; @@ -65,7 +65,7 @@ static const struct iio_trigger_ops hid_sensor_trigger_ops = { }; int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, - struct hid_sensor_iio_common *attrb) + struct hid_sensor_common *attrb) { int ret; struct iio_trigger *trig; diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h index fd98297..9a87314 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h @@ -20,7 +20,7 @@ #define _HID_SENSOR_TRIGGER_H int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, - struct hid_sensor_iio_common *attrb); + struct hid_sensor_common *attrb); void hid_sensor_remove_trigger(struct iio_dev *indio_dev); #endif diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c index b98cd70..85330ad 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c @@ -43,7 +43,7 @@ enum gyro_3d_channel { struct gyro_3d_state { struct hid_sensor_hub_callbacks callbacks; - struct hid_sensor_iio_common common_attributes; + struct hid_sensor_common common_attributes; struct hid_sensor_hub_attribute_info gyro[GYRO_3D_CHANNEL_MAX]; u32 gyro_val[GYRO_3D_CHANNEL_MAX]; }; diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c index 9610989..051b88c 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c @@ -38,7 +38,7 @@ struct als_state { struct hid_sensor_hub_callbacks callbacks; - struct hid_sensor_iio_common common_attributes; + struct hid_sensor_common common_attributes; struct hid_sensor_hub_attribute_info als_illum; u32 illum; }; diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index 4957430..5c59044 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c @@ -43,7 +43,7 @@ enum magn_3d_channel { struct magn_3d_state { struct hid_sensor_hub_callbacks callbacks; - struct hid_sensor_iio_common common_attributes; + struct hid_sensor_common common_attributes; struct hid_sensor_hub_attribute_info magn[MAGN_3D_CHANNEL_MAX]; u32 magn_val[MAGN_3D_CHANNEL_MAX]; }; diff --git a/drivers/rtc/rtc-hid-sensor-time.c b/drivers/rtc/rtc-hid-sensor-time.c index 41bc011..8050c5d 100644 --- a/drivers/rtc/rtc-hid-sensor-time.c +++ b/drivers/rtc/rtc-hid-sensor-time.c @@ -39,7 +39,7 @@ enum hid_time_channel { struct hid_time_state { struct hid_sensor_hub_callbacks callbacks; - struct hid_sensor_iio_common common_attributes; + struct hid_sensor_common common_attributes; struct hid_sensor_hub_attribute_info info[TIME_RTC_CHANNEL_MAX]; struct rtc_time last_time; spinlock_t lock_last_time; diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index e6265f9..ecefb73 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h @@ -161,7 +161,7 @@ int sensor_hub_get_feature(struct hid_sensor_hub_device *hsdev, u32 report_id, /* hid-sensor-attributes */ /* Common hid sensor iio structure */ -struct hid_sensor_iio_common { +struct hid_sensor_common { struct hid_sensor_hub_device *hsdev; struct platform_device *pdev; unsigned usage_id; @@ -185,14 +185,14 @@ static inline int hid_sensor_convert_exponent(int unit_expo) int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev, u32 usage_id, - struct hid_sensor_iio_common *st); -int hid_sensor_write_raw_hyst_value(struct hid_sensor_iio_common *st, + struct hid_sensor_common *st); +int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st, int val1, int val2); -int hid_sensor_read_raw_hyst_value(struct hid_sensor_iio_common *st, +int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st, int *val1, int *val2); -int hid_sensor_write_samp_freq_value(struct hid_sensor_iio_common *st, +int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st, int val1, int val2); -int hid_sensor_read_samp_freq_value(struct hid_sensor_iio_common *st, +int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st, int *val1, int *val2); #endif