Skip to content

Commit 9de33df

Browse files
committed
ipmi: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: openipmi-developer@lists.sourceforge.net Acked-by: Corey Minyard <minyard@acm.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent f899c2d commit 9de33df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/char/ipmi/ipmi_si_intf.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2375,14 +2375,14 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
23752375
info->io.addr_data, info->io.regsize, info->io.regspacing,
23762376
info->irq);
23772377

2378-
dev->dev.driver_data = (void *) info;
2378+
dev_set_drvdata(&dev->dev, info);
23792379

23802380
return try_smi_init(info);
23812381
}
23822382

23832383
static int __devexit ipmi_of_remove(struct of_device *dev)
23842384
{
2385-
cleanup_one_si(dev->dev.driver_data);
2385+
cleanup_one_si(dev_get_drvdata(&dev->dev));
23862386
return 0;
23872387
}
23882388

0 commit comments

Comments
 (0)