mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 20:30:26 -04:00
scsi: zorro7xx: Make use of struct zorro_device_id::driver_data_ptr
Usage of .driver_data_ptr allows to drop several casts. A nice upside of that is that now the constness of the linked structures is kept and the compiler warns about zdd missing a const. So add this missing const, too. While touching the zorro_device_id array, drop an unneeded explicit zero in the list terminator. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Helge Deller <deller@gmx.de> Link: https://patch.msgid.link/b7f3b4bfa5daabf8a3043177341b8dbb4e4d980e.1779803053.git.u.kleine-koenig@baylibre.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
841970b2f6
commit
0617678ca2
@@ -50,23 +50,23 @@ static struct zorro_driver_data {
|
||||
static struct zorro_device_id zorro7xx_zorro_tbl[] = {
|
||||
{
|
||||
.id = ZORRO_PROD_PHASE5_BLIZZARD_603E_PLUS,
|
||||
.driver_data = (unsigned long)&zorro7xx_driver_data[0],
|
||||
.driver_data_ptr = &zorro7xx_driver_data[0],
|
||||
},
|
||||
{
|
||||
.id = ZORRO_PROD_MACROSYSTEMS_WARP_ENGINE_40xx,
|
||||
.driver_data = (unsigned long)&zorro7xx_driver_data[1],
|
||||
.driver_data_ptr = &zorro7xx_driver_data[1],
|
||||
},
|
||||
{
|
||||
.id = ZORRO_PROD_CBM_A4091_1,
|
||||
.driver_data = (unsigned long)&zorro7xx_driver_data[2],
|
||||
.driver_data_ptr = &zorro7xx_driver_data[2],
|
||||
},
|
||||
{
|
||||
.id = ZORRO_PROD_CBM_A4091_2,
|
||||
.driver_data = (unsigned long)&zorro7xx_driver_data[2],
|
||||
.driver_data_ptr = &zorro7xx_driver_data[2],
|
||||
},
|
||||
{
|
||||
.id = ZORRO_PROD_GVP_GFORCE_040_060,
|
||||
.driver_data = (unsigned long)&zorro7xx_driver_data[3],
|
||||
.driver_data_ptr = &zorro7xx_driver_data[3],
|
||||
},
|
||||
{ }
|
||||
};
|
||||
@@ -77,11 +77,11 @@ static int zorro7xx_init_one(struct zorro_dev *z,
|
||||
{
|
||||
struct Scsi_Host *host;
|
||||
struct NCR_700_Host_Parameters *hostdata;
|
||||
struct zorro_driver_data *zdd;
|
||||
const struct zorro_driver_data *zdd;
|
||||
unsigned long board, ioaddr;
|
||||
|
||||
board = zorro_resource_start(z);
|
||||
zdd = (struct zorro_driver_data *)ent->driver_data;
|
||||
zdd = ent->driver_data_ptr;
|
||||
|
||||
if (zdd->absolute) {
|
||||
ioaddr = zdd->offset;
|
||||
|
||||
Reference in New Issue
Block a user