Skip to content

Commit 55e001a

Browse files
committed
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>
1 parent bf563b0 commit 55e001a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎drivers/fpga/altera-cvp.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,12 +361,12 @@ static const struct fpga_manager_ops altera_cvp_ops = {
361361
.write_complete = altera_cvp_write_complete,
362362
};
363363

364-
static ssize_t show_chkcfg(struct device_driver *dev, char *buf)
364+
static ssize_t chkcfg_show(struct device_driver *dev, char *buf)
365365
{
366366
return snprintf(buf, 3, "%d\n", altera_cvp_chkcfg);
367367
}
368368

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,
370370
size_t count)
371371
{
372372
int ret;
@@ -378,7 +378,7 @@ static ssize_t store_chkcfg(struct device_driver *drv, const char *buf,
378378
return count;
379379
}
380380

381-
static DRIVER_ATTR(chkcfg, 0600, show_chkcfg, store_chkcfg);
381+
static DRIVER_ATTR_RW(chkcfg);
382382

383383
static int altera_cvp_probe(struct pci_dev *pdev,
384384
const struct pci_device_id *dev_id);

0 commit comments

Comments
 (0)