diff options
author | Greg Kroah-Hartman <[email protected]> | 2023-03-13 19:29:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2023-03-23 13:21:42 +0100 |
commit | 790f3b60ac78efb339c7ef2f4d2dba63c804110a (patch) | |
tree | 92c3e1723f2a8b0b340c4d800402159909aa561c | |
parent | 94a1150421940ff2e8113b5fa6837774777d5b3d (diff) |
dmaengine: idxd: use const struct bus_type *
In the functions unbind_store() and bind_store(), a struct bus_type *
should be a const one, as the driver core bus functions used by this
variable are expecting the pointer to be constant, and these functions
do not modify the pointer at all.
Cc: [email protected]
Acked-by: Vinod Koul <[email protected]>
Acked-by: Fenghua Yu <[email protected]>
Acked-by: Dave Jiang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/dma/idxd/compat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/idxd/compat.c b/drivers/dma/idxd/compat.c index 3df21615f888..5fd38d1b9d28 100644 --- a/drivers/dma/idxd/compat.c +++ b/drivers/dma/idxd/compat.c @@ -16,7 +16,7 @@ extern void device_driver_detach(struct device *dev); static ssize_t unbind_store(struct device_driver *drv, const char *buf, size_t count) { - struct bus_type *bus = drv->bus; + const struct bus_type *bus = drv->bus; struct device *dev; int rc = -ENODEV; @@ -32,7 +32,7 @@ static DRIVER_ATTR_IGNORE_LOCKDEP(unbind, 0200, NULL, unbind_store); static ssize_t bind_store(struct device_driver *drv, const char *buf, size_t count) { - struct bus_type *bus = drv->bus; + const struct bus_type *bus = drv->bus; struct device *dev; struct device_driver *alt_drv = NULL; int rc = -ENODEV; |