Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nubus: Drop noop match function

nubus_bus_match() returned 1 unconditionally. This is equivalent to
no match function at all. (See driver_match_device() which does:

return drv->bus->match ? drv->bus->match(dev, drv) : 1;

.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20230313180848.2770504-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

authored by

Uwe Kleine-König and committed by
Geert Uytterhoeven
7f400a1d e36a82be

-6
-6
drivers/nubus/bus.c
··· 14 14 #define to_nubus_board(d) container_of(d, struct nubus_board, dev) 15 15 #define to_nubus_driver(d) container_of(d, struct nubus_driver, driver) 16 16 17 - static int nubus_bus_match(struct device *dev, struct device_driver *driver) 18 - { 19 - return 1; 20 - } 21 - 22 17 static int nubus_device_probe(struct device *dev) 23 18 { 24 19 struct nubus_driver *ndrv = to_nubus_driver(dev->driver); ··· 34 39 35 40 struct bus_type nubus_bus_type = { 36 41 .name = "nubus", 37 - .match = nubus_bus_match, 38 42 .probe = nubus_device_probe, 39 43 .remove = nubus_device_remove, 40 44 };