diff options
Diffstat (limited to 'drivers/net/gianfar.c')
| -rw-r--r-- | drivers/net/gianfar.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 54d294ad6df5..e3a329539f1c 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
| @@ -126,8 +126,8 @@ static irqreturn_t gfar_interrupt(int irq, void *dev_id, struct pt_regs *regs); | |||
| 126 | static void adjust_link(struct net_device *dev); | 126 | static void adjust_link(struct net_device *dev); |
| 127 | static void init_registers(struct net_device *dev); | 127 | static void init_registers(struct net_device *dev); |
| 128 | static int init_phy(struct net_device *dev); | 128 | static int init_phy(struct net_device *dev); |
| 129 | static int gfar_probe(struct device *device); | 129 | static int gfar_probe(struct platform_device *pdev); |
| 130 | static int gfar_remove(struct device *device); | 130 | static int gfar_remove(struct platform_device *pdev); |
| 131 | static void free_skb_resources(struct gfar_private *priv); | 131 | static void free_skb_resources(struct gfar_private *priv); |
| 132 | static void gfar_set_multi(struct net_device *dev); | 132 | static void gfar_set_multi(struct net_device *dev); |
| 133 | static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr); | 133 | static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr); |
| @@ -156,12 +156,11 @@ int gfar_uses_fcb(struct gfar_private *priv) | |||
| 156 | 156 | ||
| 157 | /* Set up the ethernet device structure, private data, | 157 | /* Set up the ethernet device structure, private data, |
| 158 | * and anything else we need before we start */ | 158 | * and anything else we need before we start */ |
| 159 | static int gfar_probe(struct device *device) | 159 | static int gfar_probe(struct platform_device *pdev) |
| 160 | { | 160 | { |
| 161 | u32 tempval; | 161 | u32 tempval; |
| 162 | struct net_device *dev = NULL; | 162 | struct net_device *dev = NULL; |
| 163 | struct gfar_private *priv = NULL; | 163 | struct gfar_private *priv = NULL; |
| 164 | struct platform_device *pdev = to_platform_device(device); | ||
| 165 | struct gianfar_platform_data *einfo; | 164 | struct gianfar_platform_data *einfo; |
| 166 | struct resource *r; | 165 | struct resource *r; |
| 167 | int idx; | 166 | int idx; |
| @@ -208,7 +207,7 @@ static int gfar_probe(struct device *device) | |||
| 208 | 207 | ||
| 209 | spin_lock_init(&priv->lock); | 208 | spin_lock_init(&priv->lock); |
| 210 | 209 | ||
| 211 | dev_set_drvdata(device, dev); | 210 | platform_set_drvdata(pdev, dev); |
| 212 | 211 | ||
| 213 | /* Stop the DMA engine now, in case it was running before */ | 212 | /* Stop the DMA engine now, in case it was running before */ |
| 214 | /* (The firmware could have used it, and left it running). */ | 213 | /* (The firmware could have used it, and left it running). */ |
| @@ -245,7 +244,7 @@ static int gfar_probe(struct device *device) | |||
| 245 | dev->base_addr = (unsigned long) (priv->regs); | 244 | dev->base_addr = (unsigned long) (priv->regs); |
| 246 | 245 | ||
| 247 | SET_MODULE_OWNER(dev); | 246 | SET_MODULE_OWNER(dev); |
| 248 | SET_NETDEV_DEV(dev, device); | 247 | SET_NETDEV_DEV(dev, &pdev->dev); |
| 249 | 248 | ||
| 250 | /* Fill in the dev structure */ | 249 | /* Fill in the dev structure */ |
| 251 | dev->open = gfar_enet_open; | 250 | dev->open = gfar_enet_open; |
| @@ -377,12 +376,12 @@ regs_fail: | |||
| 377 | return err; | 376 | return err; |
| 378 | } | 377 | } |
| 379 | 378 | ||
| 380 | static int gfar_remove(struct device *device) | 379 | static int gfar_remove(struct platform_device *pdev) |
| 381 | { | 380 | { |
| 382 | struct net_device *dev = dev_get_drvdata(device); | 381 | struct net_device *dev = platform_get_drvdata(pdev); |
| 383 | struct gfar_private *priv = netdev_priv(dev); | 382 | struct gfar_private *priv = netdev_priv(dev); |
| 384 | 383 | ||
| 385 | dev_set_drvdata(device, NULL); | 384 | platform_set_drvdata(pdev, NULL); |
| 386 | 385 | ||
| 387 | iounmap((void *) priv->regs); | 386 | iounmap((void *) priv->regs); |
| 388 | free_netdev(dev); | 387 | free_netdev(dev); |
| @@ -1861,11 +1860,12 @@ static irqreturn_t gfar_error(int irq, void *dev_id, struct pt_regs *regs) | |||
| 1861 | } | 1860 | } |
| 1862 | 1861 | ||
| 1863 | /* Structure for a device driver */ | 1862 | /* Structure for a device driver */ |
| 1864 | static struct device_driver gfar_driver = { | 1863 | static struct platform_driver gfar_driver = { |
| 1865 | .name = "fsl-gianfar", | ||
| 1866 | .bus = &platform_bus_type, | ||
| 1867 | .probe = gfar_probe, | 1864 | .probe = gfar_probe, |
| 1868 | .remove = gfar_remove, | 1865 | .remove = gfar_remove, |
| 1866 | .driver = { | ||
| 1867 | .name = "fsl-gianfar", | ||
| 1868 | }, | ||
| 1869 | }; | 1869 | }; |
| 1870 | 1870 | ||
| 1871 | static int __init gfar_init(void) | 1871 | static int __init gfar_init(void) |
| @@ -1875,7 +1875,7 @@ static int __init gfar_init(void) | |||
| 1875 | if (err) | 1875 | if (err) |
| 1876 | return err; | 1876 | return err; |
| 1877 | 1877 | ||
| 1878 | err = driver_register(&gfar_driver); | 1878 | err = platform_driver_register(&gfar_driver); |
| 1879 | 1879 | ||
| 1880 | if (err) | 1880 | if (err) |
| 1881 | gfar_mdio_exit(); | 1881 | gfar_mdio_exit(); |
| @@ -1885,7 +1885,7 @@ static int __init gfar_init(void) | |||
| 1885 | 1885 | ||
| 1886 | static void __exit gfar_exit(void) | 1886 | static void __exit gfar_exit(void) |
| 1887 | { | 1887 | { |
| 1888 | driver_unregister(&gfar_driver); | 1888 | platform_driver_unregister(&gfar_driver); |
| 1889 | gfar_mdio_exit(); | 1889 | gfar_mdio_exit(); |
| 1890 | } | 1890 | } |
| 1891 | 1891 | ||
