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>,
linux-pci@vger.kernel.org
Subject: [PATCH 03/11] PCI: pci-driver: convert to use DRIVER_ATTR_WO
Date: Fri, 9 Jun 2017 11:03:06 +0200 [thread overview]
Message-ID: <20170609090314.13991-3-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20170609090314.13991-1-gregkh@linuxfoundation.org>
We are trying to get rid of DRIVER_ATTR(), and all of the pci-driver
core driver attributes can be trivially changed to use DRIVER_ATTR_WO().
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: <linux-pci@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/pci/pci-driver.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 192e7b681b96..934a78a2fbef 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -96,7 +96,7 @@ static void pci_free_dynids(struct pci_driver *drv)
*
* Allow PCI IDs to be added to an existing driver via sysfs.
*/
-static ssize_t store_new_id(struct device_driver *driver, const char *buf,
+static ssize_t new_id_store(struct device_driver *driver, const char *buf,
size_t count)
{
struct pci_driver *pdrv = to_pci_driver(driver);
@@ -154,7 +154,7 @@ static ssize_t store_new_id(struct device_driver *driver, const char *buf,
return retval;
return count;
}
-static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id);
+static DRIVER_ATTR_WO(new_id);
/**
* store_remove_id - remove a PCI device ID from this driver
@@ -164,7 +164,7 @@ static DRIVER_ATTR(new_id, S_IWUSR, NULL, store_new_id);
*
* Removes a dynamic pci device ID to this driver.
*/
-static ssize_t store_remove_id(struct device_driver *driver, const char *buf,
+static ssize_t remove_id_store(struct device_driver *driver, const char *buf,
size_t count)
{
struct pci_dynid *dynid, *n;
@@ -198,7 +198,7 @@ static ssize_t store_remove_id(struct device_driver *driver, const char *buf,
return retval;
}
-static DRIVER_ATTR(remove_id, S_IWUSR, NULL, store_remove_id);
+static DRIVER_ATTR_WO(remove_id);
static struct attribute *pci_drv_attrs[] = {
&driver_attr_new_id.attr,
--
2.13.1
next prev parent reply other threads:[~2017-06-09 9:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 9:03 [PATCH 01/11] HID: hid-core: convert to use DRIVER_ATTR_RO and drv_groups Greg Kroah-Hartman
2017-06-09 9:03 ` [PATCH 02/11] IB: nes: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman
[not found] ` <20170609090314.13991-2-gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
2017-06-09 15:23 ` Bart Van Assche
2017-06-09 15:23 ` Bart Van Assche
2017-06-09 9:03 ` Greg Kroah-Hartman [this message]
2017-06-09 9:03 ` [PATCH 04/11] TTY: hvc: " Greg Kroah-Hartman
2017-06-09 9:03 ` [PATCH 05/11] net: caif: convert to use DRIVER_ATTR_RO Greg Kroah-Hartman
2017-06-09 16:20 ` David Miller
2017-06-09 9:03 ` [PATCH 06/11] net: ehea: " Greg Kroah-Hartman
2017-06-09 16:20 ` David Miller
2017-06-09 9:03 ` [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman
2017-06-09 9:25 ` Kalle Valo
2017-06-09 9:34 ` Greg Kroah-Hartman
2017-06-09 9:03 ` [PATCH 08/11] pcmcia: ds: convert to use DRIVER_ATTR_RO Greg Kroah-Hartman
2017-06-09 9:03 ` [PATCH 09/11] platform: thinkpad_acpi: convert to use DRIVER_ATTR_RO/RW Greg Kroah-Hartman
2017-06-09 9:35 ` Andy Shevchenko
2017-06-09 10:02 ` Greg Kroah-Hartman
2017-06-10 0:50 ` Darren Hart
2017-06-09 9:55 ` Henrique de Moraes Holschuh
2017-06-09 9:03 ` [PATCH 10/11] s390: drivers: convert to use DRIVER_ATTR_RO/WO Greg Kroah-Hartman
2017-06-09 10:11 ` Heiko Carstens
2017-06-09 10:20 ` Greg Kroah-Hartman
2017-06-09 9:03 ` [PATCH 11/11] USB: usbip: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman
2017-06-09 15:51 ` Shuah Khan
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=20170609090314.13991-3-gregkh@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.