Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754250Ab3GXXxv (ORCPT ); Wed, 24 Jul 2013 19:53:51 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:52885 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753464Ab3GXXxt (ORCPT ); Wed, 24 Jul 2013 19:53:49 -0400 X-AuditID: cbfee691-b7fef6d000002d62-b5-51f0690c8719 Message-id: <51F0690C.4010909@samsung.com> Date: Thu, 25 Jul 2013 08:53:48 +0900 From: Chanwoo Choi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-version: 1.0 To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, MyungJoo Ham Subject: Re: [PATCH 07/36] extcon: convert extcon_class to use dev_groups References: <1374703539-9705-1-git-send-email-gregkh@linuxfoundation.org> <1374703539-9705-8-git-send-email-gregkh@linuxfoundation.org> In-reply-to: <1374703539-9705-8-git-send-email-gregkh@linuxfoundation.org> Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHIsWRmVeSWpSXmKPExsWyRsSkWJcn80OgQe8RXovmxevZLC7vmsNm cbtxBZsDs8f+uWvYPfq2rGL0+LxJLoA5issmJTUnsyy1SN8ugStj5x7vgq1CFbu2LWVsYOzm 72Lk5JAQMJHYe7OFCcIWk7hwbz1bFyMXh5DAUkaJ1msLmLsYOcCK2r6pQMSnM0psunyaGcJ5 xSjR/e8NI0g3r4CWxOOZl1lAbBYBVYmXX1aDTWUDiu9/cYMNxBYVCJNYOf0KC0S9oMSPyffA bBEBY4n+s7PYQWxmAU+J07e6wBYLA9k/+7MgdnUySlzf2cwKUsMp4CVxYN8LNoh6HYn9rdOg bHmJzWveMkN8s4hdYuWvfIh7BCS+TT7EAvGMrMSmA1AlkhIHV9xgmcAoNgvJRbOQTJ2FZOoC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/XpmUSdza8m1VtJODPF 2s5b4/DnwLPTZqJPP3ZfWqvA4bhac7Kzyj6ZxLPvLgtLTj7DJbXjpmhdiai3nfTWKuYyi1kL lk8xWPCiz+Zg7izRvVdWRWetfP/hhcGaCS3HZMzTlDeulO94Fb1aiaU4I9FQi7moOBEA+XNt hA8DAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2533 Lines: 74 On 07/25/2013 07:05 AM, Greg Kroah-Hartman wrote: > The dev_attrs field of struct class is going away soon, dev_groups > should be used instead. This converts the extcon_class code to use the > correct field. > > Cc: MyungJoo Ham > Cc: Chanwoo Choi > Signed-off-by: Greg Kroah-Hartman > --- > MyungJoo, feel free to apply this to your tree, or ACK it and I can take it > through mine. > > drivers/extcon/extcon-class.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c > index 18ccadef..022ca369 100644 > --- a/drivers/extcon/extcon-class.c > +++ b/drivers/extcon/extcon-class.c > @@ -148,6 +148,7 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr, > > return count; > } > +static DEVICE_ATTR_RW(state); > > static ssize_t name_show(struct device *dev, struct device_attribute *attr, > char *buf) > @@ -163,6 +164,7 @@ static ssize_t name_show(struct device *dev, struct device_attribute *attr, > > return sprintf(buf, "%s\n", dev_name(edev->dev)); > } > +static DEVICE_ATTR_RO(name); > > static ssize_t cable_name_show(struct device *dev, > struct device_attribute *attr, char *buf) > @@ -527,11 +529,12 @@ int extcon_unregister_notifier(struct extcon_dev *edev, > } > EXPORT_SYMBOL_GPL(extcon_unregister_notifier); > > -static struct device_attribute extcon_attrs[] = { > - __ATTR(state, S_IRUGO | S_IWUSR, state_show, state_store), > - __ATTR_RO(name), > - __ATTR_NULL, > +static struct attribute *extcon_attrs[] = { > + &dev_attr_state.attr, > + &dev_attr_name.attr, > + NULL, > }; > +ATTRIBUTE_GROUPS(extcon); > > static int create_extcon_class(void) > { > @@ -539,7 +542,7 @@ static int create_extcon_class(void) > extcon_class = class_create(THIS_MODULE, "extcon"); > if (IS_ERR(extcon_class)) > return PTR_ERR(extcon_class); > - extcon_class->dev_attrs = extcon_attrs; > + extcon_class->dev_groups = extcon_groups; > > #if defined(CONFIG_ANDROID) > switch_class = class_compat_register("switch"); > Looks good to me. I tested this patch. Acked-by: Chanwoo Choi Thanks, Chanwoo Choi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/