Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3439048ybl; Mon, 12 Aug 2019 00:00:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcevSusX77pNxPm+QA5ZhS7GSuEP2979n4uC8GNh+GueFjpGV992Vd7qXgkwLNbpOZ7TA/ X-Received: by 2002:a65:5a44:: with SMTP id z4mr29215177pgs.41.1565593213700; Mon, 12 Aug 2019 00:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565593213; cv=none; d=google.com; s=arc-20160816; b=f4LY1j4DU3IgFsGpoSccYznfwgO6Rn/qXWcezmGjPVAsiie6YAlQmRo82pFqw1vZTM g+IF5qY0ueHl+b5T6bKkxHvNbGf2+AOGR9+fAB1Xx49odK3JdXRJ2PoepopivjhvKYxZ +NYUGOla4a6GgT/v9FxWL6I0PYNby6DvVKMMacmVOU8+xUbF+/LDYvCTxcmF1ZCf1WAr D5r+gwFD3WiDWz9noRvd2AjLjEYSkBUZA/Ge+uM33OQ4MNQssYZjByWKvnBluk8CZtRR 5LItP9xpo1iDnxCAA9Ph7m4kBtrH/lUwZ8TUow7G5Oq4pHyecIUdA1x2JcUO/3031Aku JBVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=lU9sd0t6+gG5Nv5bhUpF/5WxDNzHrTOFuSzTVXXmTl8=; b=zl1LXJyiy9k1zDDqZqHROJjKj8y5daFqwkmU+CNQUE39wxD9d9X3kCTQMriQO04Tsb eywHkE/OFv624b0Ofpt/mi7ikALA/Pmf2CjrGNo/I0LJVXwnNGLruT9ckoY/FBU93cX/ xFLMFm9QMRR85HJgRATPQZ3d6kQXyetzytpaY81ovv8HpBHva1dG912sfwtG1tX4BNDH 1QUwbbmx7sWdn9wJLBnOFxg3g/EgmYl4yVcT0wtIxIvkwh955xNy13UQ4J39Z+Ssvu1W 7jSJ8P1YouvNIygOWMPwimriEaRKt2ghK49HdiDQeezuemtkSabH7tQZCp3QNzNCvqlY Y0jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YnvbXjUb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13si66791552pfe.140.2019.08.11.23.59.58; Mon, 12 Aug 2019 00:00:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YnvbXjUb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726479AbfHLG7T (ORCPT + 99 others); Mon, 12 Aug 2019 02:59:19 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43370 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfHLG7T (ORCPT ); Mon, 12 Aug 2019 02:59:19 -0400 Received: by mail-pl1-f196.google.com with SMTP id 4so40513545pld.10; Sun, 11 Aug 2019 23:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lU9sd0t6+gG5Nv5bhUpF/5WxDNzHrTOFuSzTVXXmTl8=; b=YnvbXjUbXlQSkK3LpUAdhLpq46NSDWVuR665Ubu/270IW/4xBes43HY9xnyHv12M5L +Wx7wmzdJBh+uBRFuUUZm3XjZ2HNz24aSt2C0tnHJ3N0X5qZnLPwkFIGhzROicOathdX buPEuoqJdWYQUpDgQdVJAka7kd+5dOR64ba7JlpNiaaeGrvYnELpkHY1tEFeTbyWXdGo iEnvuWvOT+Jc/xCSbJMmHGTLyahNWiHXdg/Cdp2GY2REf+QoIJ+2/MfttFp4T7wNohjV Cgd5yZ4jZY1J4fHlp9NmGN1KS4pbrmsT/ParzL7gyOuhc+Vs880CYybK1BjIyTaP6bAl lLWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=lU9sd0t6+gG5Nv5bhUpF/5WxDNzHrTOFuSzTVXXmTl8=; b=HFBjE5TvlZG9ebyJg2N/oWJoSd1KMEZF2gGEMiDccvdtzZzkEs34p6nvMO7YuESLe5 1nvcjQgdfxW+T3dkiPc0sd+lfpnd/pnMgAZlbJ5rGQfImg4pphhtBOWAUlgZ1+F5vMdd cOBgxz72AyNBDQArcOzrMUXXcZKWEX+i2imPvU7ZNIiXeW6eqC0E191l5pvfkMjUJUmm AtZHzjR7Qy3DZjhbdiZ4GT0oedE/gzR3J/fmvm+7kk5SXYfm64wt9L4lwkQpX2vZi2lv 0vcH2rlj6vt2UX6o7ElAXbdIIsx+b+YIAj0BLS3F97eRXKSzJOqXiSE5bMHmn6LiIsKx 5uNA== X-Gm-Message-State: APjAAAVsdvH14ytA/3tjxMax/PMZYdVn7oFrpDP87Ih4IeTaiyUJ4Eww FbjKidr3B4KOI2CaO5HHqwI= X-Received: by 2002:a17:902:b68f:: with SMTP id c15mr31825302pls.104.1565593158123; Sun, 11 Aug 2019 23:59:18 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id n7sm118800185pff.59.2019.08.11.23.59.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 11 Aug 2019 23:59:17 -0700 (PDT) Date: Sun, 11 Aug 2019 23:59:15 -0700 From: Dmitry Torokhov To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Richard Gong , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH v2 03/10] input: keyboard: gpio_keys: convert platform driver to use dev_groups Message-ID: <20190812065915.GU178933@dtor-ws> References: <20190731124349.4474-1-gregkh@linuxfoundation.org> <20190731124349.4474-4-gregkh@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190731124349.4474-4-gregkh@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 31, 2019 at 02:43:42PM +0200, Greg Kroah-Hartman wrote: > Platform drivers now have the option to have the platform core create > and remove any needed sysfs attribute files. So take advantage of that > and do not register "by hand" a bunch of sysfs files. > > Cc: Bartlomiej Zolnierkiewicz > Cc: dri-devel@lists.freedesktop.org > Cc: linux-fbdev@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman Applied, thank you. > --- > drivers/input/keyboard/gpio_keys.c | 13 ++----------- > 1 file changed, 2 insertions(+), 11 deletions(-) > > diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c > index 03f4d152f6b7..1373dc5b0765 100644 > --- a/drivers/input/keyboard/gpio_keys.c > +++ b/drivers/input/keyboard/gpio_keys.c > @@ -351,10 +351,7 @@ static struct attribute *gpio_keys_attrs[] = { > &dev_attr_disabled_switches.attr, > NULL, > }; > - > -static const struct attribute_group gpio_keys_attr_group = { > - .attrs = gpio_keys_attrs, > -}; > +ATTRIBUTE_GROUPS(gpio_keys); > > static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata) > { > @@ -851,13 +848,6 @@ static int gpio_keys_probe(struct platform_device *pdev) > > fwnode_handle_put(child); > > - error = devm_device_add_group(dev, &gpio_keys_attr_group); > - if (error) { > - dev_err(dev, "Unable to export keys/switches, error: %d\n", > - error); > - return error; > - } > - > error = input_register_device(input); > if (error) { > dev_err(dev, "Unable to register input device, error: %d\n", > @@ -1026,6 +1016,7 @@ static struct platform_driver gpio_keys_device_driver = { > .name = "gpio-keys", > .pm = &gpio_keys_pm_ops, > .of_match_table = gpio_keys_of_match, > + .dev_groups = gpio_keys_groups, > } > }; > > -- > 2.22.0 > -- Dmitry