Skip to content

Commit

Permalink
fpga: altera-cvp: remove DRIVER_ATTR() usage
Browse files Browse the repository at this point in the history
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: [email protected]
Reviewed-by: Moritz Fischer <[email protected]>
Acked-by: Alan Tull <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Sep 19, 2017
1 parent bf563b0 commit 55e001a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/fpga/altera-cvp.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,12 @@ static const struct fpga_manager_ops altera_cvp_ops = {
.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);
}

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)
{
int ret;
Expand All @@ -378,7 +378,7 @@ static ssize_t store_chkcfg(struct device_driver *drv, const char *buf,
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,
const struct pci_device_id *dev_id);
Expand Down

0 comments on commit 55e001a

Please sign in to comment.