Skip to content

Commit b57d5ff

Browse files
committed
ARM: sa1100: make match function take a const pointer
In commit d69d804 ("driver core: have match() callback in struct bus_type take a const *"), the match callback for busses was changed to take a const pointer to struct device_driver. Unfortunately I missed fixing up the sa1111 code, and was only noticed after-the-fact by the kernel test robot. Resolve this issue by properly changing the sa111_match() function. Cc: Russell King <[email protected]> Fixes: d69d804 ("driver core: have match() callback in struct bus_type take a const *") Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e777798 commit b57d5ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/arm/common/sa1111.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,10 +1339,10 @@ EXPORT_SYMBOL_GPL(sa1111_get_irq);
13391339
* We model this as a regular bus type, and hang devices directly
13401340
* off this.
13411341
*/
1342-
static int sa1111_match(struct device *_dev, struct device_driver *_drv)
1342+
static int sa1111_match(struct device *_dev, const struct device_driver *_drv)
13431343
{
13441344
struct sa1111_dev *dev = to_sa1111_device(_dev);
1345-
struct sa1111_driver *drv = SA1111_DRV(_drv);
1345+
const struct sa1111_driver *drv = SA1111_DRV(_drv);
13461346

13471347
return !!(dev->devid & drv->devid);
13481348
}

arch/arm/include/asm/hardware/sa1111.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ struct sa1111_driver {
404404
void (*remove)(struct sa1111_dev *);
405405
};
406406

407-
#define SA1111_DRV(_d) container_of((_d), struct sa1111_driver, drv)
407+
#define SA1111_DRV(_d) container_of_const((_d), struct sa1111_driver, drv)
408408

409409
#define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name)
410410

0 commit comments

Comments
 (0)