From patchwork Sat Dec 7 15:41:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 3305071 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 D5478C0D4A for ; Sat, 7 Dec 2013 15:41:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0075120220 for ; Sat, 7 Dec 2013 15:41:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C775C201F4 for ; Sat, 7 Dec 2013 15:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755158Ab3LGPl0 (ORCPT ); Sat, 7 Dec 2013 10:41:26 -0500 Received: from mail-pd0-f172.google.com ([209.85.192.172]:51764 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755038Ab3LGPl0 (ORCPT ); Sat, 7 Dec 2013 10:41:26 -0500 Received: by mail-pd0-f172.google.com with SMTP id g10so2622013pdj.17 for ; Sat, 07 Dec 2013 07:41:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=dzTkKD7sAok+8lHB1A8lFfDEfXx4JsPzX77rq3OouF8=; b=vDvUzCmyX0iKO9Ds77L10qjZzG4qfEUF5XRUd//l2wZ3fOAZwcP0zJ71cEdcB5gnU8 3W3yeQLewBhAKgS6+fhC5aSt8psFTSGk7DTmQ8SVQ1Pc0KeCKZuGKJ1F5ObhGTIqFfEB WHPhw/c4zOaW+aR7wD6LrmULQF76ffVp3+WQ2qo+od0hl+m1bS+FRpZO9N5akFeBtegC It+MGpMh5uyP7m/Vnns4gVN3tZK7EfUjd4xhlYohwKp4dzFOQxTjDMjjqFcBn1GT9blO yzDfgswPYhy4SugYpq0jrmOr4O8puF/ai+hX/wAgdItl89vsithqc2ytu8NlBLHz5wEr 6K+Q== X-Received: by 10.66.122.40 with SMTP id lp8mr10891805pab.82.1386430885706; Sat, 07 Dec 2013 07:41:25 -0800 (PST) Received: from mailhub.coreip.homeip.net (c-67-188-112-76.hsd1.ca.comcast.net. [67.188.112.76]) by mx.google.com with ESMTPSA id y9sm7187590pas.10.2013.12.07.07.41.23 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 07 Dec 2013 07:41:24 -0800 (PST) Date: Sat, 7 Dec 2013 07:41:19 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Greg Kroah-Hartman , Thomas Hellstrom , linux-kernel@vger.kernel.org Subject: [PATCH] Input: serio - fix sysfs layout Message-ID: <20131207154116.GA9902@core.coreip.homeip.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 Restore previous layout of sysfs attributes that was broken by commit 3778a2129bcce84f684cc0017ed20d2524afd289 (input: serio: remove bus usage of dev_attrs) which moved all serio device attributes into 'id' group, when only 'type', 'proto', 'id', and 'extra' should be in 'id' group and the rest of attributes should be attached directly to the device. Reported-by: Thomas Hellstrom Signed-off-by: Dmitry Torokhov Acked-by: Greg Kroah-Hartman Tested-by: Thomas Hellstrom --- drivers/input/serio/serio.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 98707fb..8f4c4ab 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -455,16 +455,26 @@ static DEVICE_ATTR_RO(type); static DEVICE_ATTR_RO(proto); static DEVICE_ATTR_RO(id); static DEVICE_ATTR_RO(extra); -static DEVICE_ATTR_RO(modalias); -static DEVICE_ATTR_WO(drvctl); -static DEVICE_ATTR(description, S_IRUGO, serio_show_description, NULL); -static DEVICE_ATTR(bind_mode, S_IWUSR | S_IRUGO, serio_show_bind_mode, serio_set_bind_mode); static struct attribute *serio_device_id_attrs[] = { &dev_attr_type.attr, &dev_attr_proto.attr, &dev_attr_id.attr, &dev_attr_extra.attr, + NULL +}; + +static struct attribute_group serio_id_attr_group = { + .name = "id", + .attrs = serio_device_id_attrs, +}; + +static DEVICE_ATTR_RO(modalias); +static DEVICE_ATTR_WO(drvctl); +static DEVICE_ATTR(description, S_IRUGO, serio_show_description, NULL); +static DEVICE_ATTR(bind_mode, S_IWUSR | S_IRUGO, serio_show_bind_mode, serio_set_bind_mode); + +static struct attribute *serio_device_attrs[] = { &dev_attr_modalias.attr, &dev_attr_description.attr, &dev_attr_drvctl.attr, @@ -472,13 +482,13 @@ static struct attribute *serio_device_id_attrs[] = { NULL }; -static struct attribute_group serio_id_attr_group = { - .name = "id", - .attrs = serio_device_id_attrs, +static struct attribute_group serio_device_attr_group = { + .attrs = serio_device_attrs, }; static const struct attribute_group *serio_device_attr_groups[] = { &serio_id_attr_group, + &serio_device_attr_group, NULL };