From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH 01/15] PCI: convert bus code to use bus_groups
Date: Fri, 23 Aug 2013 14:24:27 -0700 [thread overview]
Message-ID: <1377293081-10957-1-git-send-email-gregkh@linuxfoundation.org> (raw)
The bus_attrs field of struct bus_type is going away soon, dev_groups
should be used instead. This converts the PCI bus code to use the
correct field.
Cc: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/pci/pci-driver.c | 2 +-
drivers/pci/pci-sysfs.c | 16 +++++++++++++---
drivers/pci/pci.h | 2 +-
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index e6515e21..09db761e 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -1274,7 +1274,7 @@ struct bus_type pci_bus_type = {
.remove = pci_device_remove,
.shutdown = pci_device_shutdown,
.dev_attrs = pci_dev_attrs,
- .bus_attrs = pci_bus_attrs,
+ .bus_groups = pci_bus_groups,
.drv_attrs = pci_drv_attrs,
.pm = PCI_PM_OPS_PTR,
};
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index c0dbe1f6..f0195946 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -302,10 +302,20 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
}
return count;
}
+static BUS_ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store);
-struct bus_attribute pci_bus_attrs[] = {
- __ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, bus_rescan_store),
- __ATTR_NULL
+struct attribute *pci_bus_attrs[] = {
+ &bus_attr_rescan.attr,
+ NULL,
+};
+
+static const struct attribute_group pci_bus_group = {
+ .attrs = pci_bus_attrs,
+};
+
+const struct attribute_group *pci_bus_groups[] = {
+ &pci_bus_group,
+ NULL,
};
static ssize_t
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index d1182c4a..62bcf2bd 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -153,7 +153,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev)
extern struct device_attribute pci_dev_attrs[];
extern struct device_attribute pcibus_dev_attrs[];
extern struct device_type pci_dev_type;
-extern struct bus_attribute pci_bus_attrs[];
+extern const struct attribute_group *pci_bus_groups[];
/**
--
1.8.3.rc0.20.gb99dd2e
next reply other threads:[~2013-08-23 21:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 21:24 Greg Kroah-Hartman [this message]
2013-08-23 21:24 ` [PATCH 02/15] rbd: convert bus code to use bus_groups Greg Kroah-Hartman
2013-08-27 12:35 ` Alex Elder
2013-08-28 5:07 ` Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 03/15] rapidio: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 04/15] PPC: ibmebus: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 05/15] PPC: VIO: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 06/15] SCSI: fcoe: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 07/15] Input: gameport: convert bus code to use drv_groups Greg Kroah-Hartman
2013-08-24 23:33 ` Dmitry Torokhov
2013-08-25 21:56 ` Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 08/15] Input: serio: " Greg Kroah-Hartman
2013-08-24 23:33 ` Dmitry Torokhov
2013-08-23 21:24 ` [PATCH 09/15] PCI: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 10/15] USB: serial: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 11/15] driver-core: platform: convert bus code to use dev_groups Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 12/15] HID: " Greg Kroah-Hartman
2013-08-26 11:42 ` Jiri Kosina
2013-08-26 12:05 ` Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 13/15] MEI: " Greg Kroah-Hartman
2013-08-23 21:27 ` Winkler, Tomas
2013-08-23 21:24 ` [PATCH 14/15] pmu_bus: " Greg Kroah-Hartman
2013-08-23 21:24 ` [PATCH 15/15] workqueue: " Greg Kroah-Hartman
2013-08-23 21:28 ` Tejun Heo
2013-08-23 21:34 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377293081-10957-1-git-send-email-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox