Commit d18dbfa7 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3cf62a5a
...@@ -373,7 +373,7 @@ static int __init eisa_probe(struct parisc_device *dev) ...@@ -373,7 +373,7 @@ static int __init eisa_probe(struct parisc_device *dev)
if (result >= 0) { if (result >= 0) {
/* FIXME : Don't enumerate the bus twice. */ /* FIXME : Don't enumerate the bus twice. */
eisa_dev.root.dev = &dev->dev; eisa_dev.root.dev = &dev->dev;
dev->dev.driver_data = &eisa_dev.root; dev_set_drvdata(&dev->dev, &eisa_dev.root);
eisa_dev.root.bus_base_addr = 0; eisa_dev.root.bus_base_addr = 0;
eisa_dev.root.res = &eisa_dev.hba.io_space; eisa_dev.root.res = &eisa_dev.hba.io_space;
eisa_dev.root.slots = result; eisa_dev.root.slots = result;
......
...@@ -2010,7 +2010,7 @@ void __init sba_init(void) ...@@ -2010,7 +2010,7 @@ void __init sba_init(void)
void * sba_get_iommu(struct parisc_device *pci_hba) void * sba_get_iommu(struct parisc_device *pci_hba)
{ {
struct parisc_device *sba_dev = parisc_parent(pci_hba); struct parisc_device *sba_dev = parisc_parent(pci_hba);
struct sba_device *sba = sba_dev->dev.driver_data; struct sba_device *sba = dev_get_drvdata(&sba_dev->dev);
char t = sba_dev->id.hw_type; char t = sba_dev->id.hw_type;
int iocnum = (pci_hba->hw_path >> 3); /* rope # */ int iocnum = (pci_hba->hw_path >> 3); /* rope # */
...@@ -2031,7 +2031,7 @@ void * sba_get_iommu(struct parisc_device *pci_hba) ...@@ -2031,7 +2031,7 @@ void * sba_get_iommu(struct parisc_device *pci_hba)
void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r) void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r)
{ {
struct parisc_device *sba_dev = parisc_parent(pci_hba); struct parisc_device *sba_dev = parisc_parent(pci_hba);
struct sba_device *sba = sba_dev->dev.driver_data; struct sba_device *sba = dev_get_drvdata(&sba_dev->dev);
char t = sba_dev->id.hw_type; char t = sba_dev->id.hw_type;
int i; int i;
int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */
...@@ -2073,7 +2073,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r) ...@@ -2073,7 +2073,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r)
void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r ) void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r )
{ {
struct parisc_device *sba_dev = parisc_parent(pci_hba); struct parisc_device *sba_dev = parisc_parent(pci_hba);
struct sba_device *sba = sba_dev->dev.driver_data; struct sba_device *sba = dev_get_drvdata(&sba_dev->dev);
char t = sba_dev->id.hw_type; char t = sba_dev->id.hw_type;
int base, size; int base, size;
int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */ int rope = (pci_hba->hw_path & (ROPES_PER_IOC-1)); /* rope # */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment