diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-30 16:19:31 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-02 02:21:55 +0400 |
commit | 1aec5bdfed91b50aedbcad43393bcb05033c7ef3 (patch) | |
tree | 258db4a51298bc18f859170e8d611a8e3b406b0f /drivers/net/smc-mca.c | |
parent | aba7453037c3a90714caae77a622dceaf1173786 (diff) | |
download | linux-1aec5bdfed91b50aedbcad43393bcb05033c7ef3.tar.xz |
net: 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: netdev@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smc-mca.c')
-rw-r--r-- | drivers/net/smc-mca.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/smc-mca.c b/drivers/net/smc-mca.c index 8d36d40649ef..c791ef76c1d6 100644 --- a/drivers/net/smc-mca.c +++ b/drivers/net/smc-mca.c @@ -370,7 +370,7 @@ static int __init ultramca_probe(struct device *gen_dev) outb(reg4, ioaddr + 4); - gen_dev->driver_data = dev; + dev_set_drvdata(gen_dev, dev); /* The 8390 isn't at the base address, so fake the offset */ @@ -531,7 +531,7 @@ static int ultramca_close_card(struct net_device *dev) static int ultramca_remove(struct device *gen_dev) { struct mca_device *mca_dev = to_mca_device(gen_dev); - struct net_device *dev = (struct net_device *)gen_dev->driver_data; + struct net_device *dev = dev_get_drvdata(gen_dev); if (dev) { /* NB: ultra_close_card() does free_irq */ |