Hi Uwe, On Fri, Jul 30, 2021 at 9:10 PM Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
The only actual use is to check in zorro_device_probe() that the device isn't already bound. The driver core already ensures this however so the check can go away which allows to drop the then assigned-only member from struct zorro_dev. If the value was indeed needed somewhere it can always be calculated by to_zorro_driver(z->dev.driver) . Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Thanks for your patch!
--- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c @@ -47,16 +47,14 @@ static int zorro_device_probe(struct device *dev) struct zorro_driver *drv = to_zorro_driver(dev->driver); struct zorro_dev *z = to_zorro_dev(dev); - if (!z->driver && drv->probe) { + if (drv->probe) { const struct zorro_device_id *id; id = zorro_match_device(drv->id_table, z); if (id) error = drv->probe(z, id); - if (error >= 0) { - z->driver = drv; + if (error >= 0)
I guess this test can become "> 0" now, but that doesn't matter much. Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
error = 0; - } } return error; }
Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds