On 07/29/2019 10:53 AM, Geert Uytterhoeven wrote: >> + switch (z->id) { >> + case ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA: >> + default: >> + type = BOARD_BUDDHA; >> + break; >> + case ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL: >> + type = BOARD_CATWEASEL; >> + nr_ports++; >> + break; >> + case ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF: >> + type = BOARD_XSURF; >> + break; >> + } > > Please obtain the type from ent->driver_data instead of using a switch() > statement... > >> -module_init(pata_buddha_init_one); >> +static const struct zorro_device_id pata_buddha_zorro_tbl[] = { >> + { ZORRO_PROD_INDIVIDUAL_COMPUTERS_BUDDHA, }, >> + { ZORRO_PROD_INDIVIDUAL_COMPUTERS_CATWEASEL, }, >> + { ZORRO_PROD_INDIVIDUAL_COMPUTERS_X_SURF, }, > > ... after storing it in zorro_device_id.driver_data here. Thanks Geert for your feedback, this is a good idea. I'll make this change. Max