Commit 55e001aa authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarMoritz Fischer <mdf@kernel.org>
Acked-by: default avatarAlan Tull <atull@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bf563b01
...@@ -361,12 +361,12 @@ static const struct fpga_manager_ops altera_cvp_ops = { ...@@ -361,12 +361,12 @@ static const struct fpga_manager_ops altera_cvp_ops = {
.write_complete = altera_cvp_write_complete, .write_complete = altera_cvp_write_complete,
}; };
static ssize_t show_chkcfg(struct device_driver *dev, char *buf) static ssize_t chkcfg_show(struct device_driver *dev, char *buf)
{ {
return snprintf(buf, 3, "%d\n", altera_cvp_chkcfg); return snprintf(buf, 3, "%d\n", altera_cvp_chkcfg);
} }
static ssize_t store_chkcfg(struct device_driver *drv, const char *buf, static ssize_t chkcfg_store(struct device_driver *drv, const char *buf,
size_t count) size_t count)
{ {
int ret; int ret;
...@@ -378,7 +378,7 @@ static ssize_t store_chkcfg(struct device_driver *drv, const char *buf, ...@@ -378,7 +378,7 @@ static ssize_t store_chkcfg(struct device_driver *drv, const char *buf,
return count; return count;
} }
static DRIVER_ATTR(chkcfg, 0600, show_chkcfg, store_chkcfg); static DRIVER_ATTR_RW(chkcfg);
static int altera_cvp_probe(struct pci_dev *pdev, static int altera_cvp_probe(struct pci_dev *pdev,
const struct pci_device_id *dev_id); const struct pci_device_id *dev_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment