From patchwork Tue Jun 6 19:22:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 9769893 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BD3EA60393 for ; Tue, 6 Jun 2017 19:30:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD5D52621B for ; Tue, 6 Jun 2017 19:30:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A208E26E76; Tue, 6 Jun 2017 19:30:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 262532623D for ; Tue, 6 Jun 2017 19:30:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751701AbdFFTYQ (ORCPT ); Tue, 6 Jun 2017 15:24:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33654 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbdFFTYP (ORCPT ); Tue, 6 Jun 2017 15:24:15 -0400 Received: from localhost (LFbn-1-12060-104.w90-92.abo.wanadoo.fr [90.92.122.104]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7AF67B7A; Tue, 6 Jun 2017 19:24:14 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Srinivas Pandruvada , Jiri Kosina , Benjamin Tissoires , Wei Yongjun , Bhumika Goyal , Rasmus Villemoes , linux-input@vger.kernel.org Subject: [PATCH 13/16] hid: intel-ish-hid: use dev_groups and not dev_attrs for bus_type Date: Tue, 6 Jun 2017 21:22:18 +0200 Message-Id: <20170606192221.1617-14-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170606192221.1617-1-gregkh@linuxfoundation.org> References: <20170606192221.1617-1-gregkh@linuxfoundation.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The dev_attrs field has long been "depreciated" and is finally being removed, so move the driver to use the "correct" dev_groups field instead for struct bus_type. Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Wei Yongjun Cc: Bhumika Goyal Cc: Rasmus Villemoes Cc: Signed-off-by: Greg Kroah-Hartman Acked-by: Srinivas Pandruvada Acked-by: Jiri Kosina --- drivers/hid/intel-ish-hid/ishtp/bus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/hid/intel-ish-hid/ishtp/bus.c b/drivers/hid/intel-ish-hid/ishtp/bus.c index 5f382fedc2ab..f272cdd9bd55 100644 --- a/drivers/hid/intel-ish-hid/ishtp/bus.c +++ b/drivers/hid/intel-ish-hid/ishtp/bus.c @@ -321,11 +321,13 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a, len = snprintf(buf, PAGE_SIZE, "ishtp:%s\n", dev_name(dev)); return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; } +static DEVICE_ATTR_RO(modalias); -static struct device_attribute ishtp_cl_dev_attrs[] = { - __ATTR_RO(modalias), - __ATTR_NULL, +static struct attribute *ishtp_cl_dev_attrs[] = { + &dev_attr_modalias.attr, + NULL, }; +ATTRIBUTE_GROUPS(ishtp_cl_dev); static int ishtp_cl_uevent(struct device *dev, struct kobj_uevent_env *env) { @@ -346,7 +348,7 @@ static const struct dev_pm_ops ishtp_cl_bus_dev_pm_ops = { static struct bus_type ishtp_cl_bus_type = { .name = "ishtp", - .dev_attrs = ishtp_cl_dev_attrs, + .dev_groups = ishtp_cl_dev_groups, .probe = ishtp_cl_device_probe, .remove = ishtp_cl_device_remove, .pm = &ishtp_cl_bus_dev_pm_ops,