Skip to content

Commit

Permalink
dmaengine: idxd: add driver name
Browse files Browse the repository at this point in the history
Add name field in idxd_device_driver so we don't have to touch the
'struct device_driver' during declaration.

Reviewed-by: Dan Williams <[email protected]>
Signed-off-by: Dave Jiang <[email protected]>
Link: https://lore.kernel.org/r/162637459517.744545.7572915135318813722.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
davejiang authored and vinodkoul committed Jul 21, 2021
1 parent 3ecfc91 commit da5a11d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions drivers/dma/idxd/idxd.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ enum idxd_type {
#define IDXD_PMU_EVENT_MAX 64

struct idxd_device_driver {
const char *name;
struct device_driver drv;
};

Expand Down
1 change: 1 addition & 0 deletions drivers/dma/idxd/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ int __idxd_driver_register(struct idxd_device_driver *idxd_drv, struct module *o
{
struct device_driver *drv = &idxd_drv->drv;

drv->name = idxd_drv->name;
drv->bus = &dsa_bus_type;
drv->owner = owner;
drv->mod_name = mod_name;
Expand Down
4 changes: 1 addition & 3 deletions drivers/dma/idxd/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,7 @@ struct bus_type dsa_bus_type = {
};

static struct idxd_device_driver dsa_drv = {
.drv = {
.name = "dsa",
},
.name = "dsa",
};

/* IDXD generic driver setup */
Expand Down

0 comments on commit da5a11d

Please sign in to comment.