diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-18 06:17:36 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-19 03:20:33 -0400 |
commit | 55e001aabb826c96f09e0a440bdcbce620189dbc (patch) | |
tree | 783295f836b5bb630d3744f7984a0ba3efb4d1ea /drivers/fpga | |
parent | bf563b01c2895a4bfd1a29cc5abc67fe706ecffd (diff) |
fpga: altera-cvp: remove DRIVER_ATTR() usage
It's better to be explicit and use the DRIVER_ATTR_RW() macro when
defining a driver's sysfs file.
This is part of a series to drop DRIVER_ATTR() from the tree entirely.
Cc: linux-fpga@vger.kernel.org
Reviewed-by: Moritz Fischer <mdf@kernel.org>
Acked-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga')
-rw-r--r-- | drivers/fpga/altera-cvp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c index 08629ee69d11..00e73d28077c 100644 --- a/drivers/fpga/altera-cvp.c +++ b/drivers/fpga/altera-cvp.c | |||
@@ -361,12 +361,12 @@ static const struct fpga_manager_ops altera_cvp_ops = { | |||
361 | .write_complete = altera_cvp_write_complete, | 361 | .write_complete = altera_cvp_write_complete, |
362 | }; | 362 | }; |
363 | 363 | ||
364 | static ssize_t show_chkcfg(struct device_driver *dev, char *buf) | 364 | static ssize_t chkcfg_show(struct device_driver *dev, char *buf) |
365 | { | 365 | { |
366 | return snprintf(buf, 3, "%d\n", altera_cvp_chkcfg); | 366 | return snprintf(buf, 3, "%d\n", altera_cvp_chkcfg); |
367 | } | 367 | } |
368 | 368 | ||
369 | static ssize_t store_chkcfg(struct device_driver *drv, const char *buf, | 369 | static ssize_t chkcfg_store(struct device_driver *drv, const char *buf, |
370 | size_t count) | 370 | size_t count) |
371 | { | 371 | { |
372 | int ret; | 372 | int ret; |
@@ -378,7 +378,7 @@ static ssize_t store_chkcfg(struct device_driver *drv, const char *buf, | |||
378 | return count; | 378 | return count; |
379 | } | 379 | } |
380 | 380 | ||
381 | static DRIVER_ATTR(chkcfg, 0600, show_chkcfg, store_chkcfg); | 381 | static DRIVER_ATTR_RW(chkcfg); |
382 | 382 | ||
383 | static int altera_cvp_probe(struct pci_dev *pdev, | 383 | static int altera_cvp_probe(struct pci_dev *pdev, |
384 | const struct pci_device_id *dev_id); | 384 | const struct pci_device_id *dev_id); |