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

parisc: 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: linux-parisc@vger.kernel.org
Cc: Helge Deller <deller@gmx.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

+4 -4
+1 -1
drivers/parisc/eisa.c
··· 373 373 if (result >= 0) { 374 374 /* FIXME : Don't enumerate the bus twice. */ 375 375 eisa_dev.root.dev = &dev->dev; 376 - dev->dev.driver_data = &eisa_dev.root; 376 + dev_set_drvdata(&dev->dev, &eisa_dev.root); 377 377 eisa_dev.root.bus_base_addr = 0; 378 378 eisa_dev.root.res = &eisa_dev.hba.io_space; 379 379 eisa_dev.root.slots = result;
+3 -3
drivers/parisc/sba_iommu.c
··· 2010 2010 void * sba_get_iommu(struct parisc_device *pci_hba) 2011 2011 { 2012 2012 struct parisc_device *sba_dev = parisc_parent(pci_hba); 2013 - struct sba_device *sba = sba_dev->dev.driver_data; 2013 + struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); 2014 2014 char t = sba_dev->id.hw_type; 2015 2015 int iocnum = (pci_hba->hw_path >> 3); /* rope # */ 2016 2016 ··· 2031 2031 void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r) 2032 2032 { 2033 2033 struct parisc_device *sba_dev = parisc_parent(pci_hba); 2034 - struct sba_device *sba = sba_dev->dev.driver_data; 2034 + struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); 2035 2035 char t = sba_dev->id.hw_type; 2036 2036 int i; 2037 2037 int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ ··· 2073 2073 void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r ) 2074 2074 { 2075 2075 struct parisc_device *sba_dev = parisc_parent(pci_hba); 2076 - struct sba_device *sba = sba_dev->dev.driver_data; 2076 + struct sba_device *sba = dev_get_drvdata(&sba_dev->dev); 2077 2077 char t = sba_dev->id.hw_type; 2078 2078 int base, size; 2079 2079 int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */