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

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>

+2 -2
+2 -2
drivers/char/ipmi/ipmi_si_intf.c
··· 2375 2375 info->io.addr_data, info->io.regsize, info->io.regspacing, 2376 2376 info->irq); 2377 2377 2378 - dev->dev.driver_data = (void *) info; 2378 + dev_set_drvdata(&dev->dev, info); 2379 2379 2380 2380 return try_smi_init(info); 2381 2381 } 2382 2382 2383 2383 static int __devexit ipmi_of_remove(struct of_device *dev) 2384 2384 { 2385 - cleanup_one_si(dev->dev.driver_data); 2385 + cleanup_one_si(dev_get_drvdata(&dev->dev)); 2386 2386 return 0; 2387 2387 } 2388 2388