diff options
Diffstat (limited to 'drivers/net/sunhme.c')
-rw-r--r-- | drivers/net/sunhme.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 3d9650b8d38f..bd0df1c14955 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -1591,7 +1591,7 @@ static int happy_meal_init(struct happy_meal *hp) | |||
1591 | */ | 1591 | */ |
1592 | #ifdef CONFIG_SBUS | 1592 | #ifdef CONFIG_SBUS |
1593 | if ((hp->happy_flags & HFLAG_PCI) == 0) { | 1593 | if ((hp->happy_flags & HFLAG_PCI) == 0) { |
1594 | struct of_device *op = hp->happy_dev; | 1594 | struct platform_device *op = hp->happy_dev; |
1595 | if (sbus_can_dma_64bit()) { | 1595 | if (sbus_can_dma_64bit()) { |
1596 | sbus_set_sbus64(&op->dev, | 1596 | sbus_set_sbus64(&op->dev, |
1597 | hp->happy_bursts); | 1597 | hp->happy_bursts); |
@@ -2480,7 +2480,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info | |||
2480 | #ifdef CONFIG_SBUS | 2480 | #ifdef CONFIG_SBUS |
2481 | else { | 2481 | else { |
2482 | const struct linux_prom_registers *regs; | 2482 | const struct linux_prom_registers *regs; |
2483 | struct of_device *op = hp->happy_dev; | 2483 | struct platform_device *op = hp->happy_dev; |
2484 | regs = of_get_property(op->dev.of_node, "regs", NULL); | 2484 | regs = of_get_property(op->dev.of_node, "regs", NULL); |
2485 | if (regs) | 2485 | if (regs) |
2486 | sprintf(info->bus_info, "SBUS:%d", | 2486 | sprintf(info->bus_info, "SBUS:%d", |
@@ -2515,13 +2515,13 @@ static int hme_version_printed; | |||
2515 | * | 2515 | * |
2516 | * Return NULL on failure. | 2516 | * Return NULL on failure. |
2517 | */ | 2517 | */ |
2518 | static struct quattro * __devinit quattro_sbus_find(struct of_device *child) | 2518 | static struct quattro * __devinit quattro_sbus_find(struct platform_device *child) |
2519 | { | 2519 | { |
2520 | struct device *parent = child->dev.parent; | 2520 | struct device *parent = child->dev.parent; |
2521 | struct of_device *op; | 2521 | struct platform_device *op; |
2522 | struct quattro *qp; | 2522 | struct quattro *qp; |
2523 | 2523 | ||
2524 | op = to_of_device(parent); | 2524 | op = to_platform_device(parent); |
2525 | qp = dev_get_drvdata(&op->dev); | 2525 | qp = dev_get_drvdata(&op->dev); |
2526 | if (qp) | 2526 | if (qp) |
2527 | return qp; | 2527 | return qp; |
@@ -2551,7 +2551,7 @@ static int __init quattro_sbus_register_irqs(void) | |||
2551 | struct quattro *qp; | 2551 | struct quattro *qp; |
2552 | 2552 | ||
2553 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { | 2553 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { |
2554 | struct of_device *op = qp->quattro_dev; | 2554 | struct platform_device *op = qp->quattro_dev; |
2555 | int err, qfe_slot, skip = 0; | 2555 | int err, qfe_slot, skip = 0; |
2556 | 2556 | ||
2557 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { | 2557 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { |
@@ -2561,7 +2561,7 @@ static int __init quattro_sbus_register_irqs(void) | |||
2561 | if (skip) | 2561 | if (skip) |
2562 | continue; | 2562 | continue; |
2563 | 2563 | ||
2564 | err = request_irq(op->irqs[0], | 2564 | err = request_irq(op->archdata.irqs[0], |
2565 | quattro_sbus_interrupt, | 2565 | quattro_sbus_interrupt, |
2566 | IRQF_SHARED, "Quattro", | 2566 | IRQF_SHARED, "Quattro", |
2567 | qp); | 2567 | qp); |
@@ -2580,7 +2580,7 @@ static void quattro_sbus_free_irqs(void) | |||
2580 | struct quattro *qp; | 2580 | struct quattro *qp; |
2581 | 2581 | ||
2582 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { | 2582 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { |
2583 | struct of_device *op = qp->quattro_dev; | 2583 | struct platform_device *op = qp->quattro_dev; |
2584 | int qfe_slot, skip = 0; | 2584 | int qfe_slot, skip = 0; |
2585 | 2585 | ||
2586 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { | 2586 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { |
@@ -2590,7 +2590,7 @@ static void quattro_sbus_free_irqs(void) | |||
2590 | if (skip) | 2590 | if (skip) |
2591 | continue; | 2591 | continue; |
2592 | 2592 | ||
2593 | free_irq(op->irqs[0], qp); | 2593 | free_irq(op->archdata.irqs[0], qp); |
2594 | } | 2594 | } |
2595 | } | 2595 | } |
2596 | #endif /* CONFIG_SBUS */ | 2596 | #endif /* CONFIG_SBUS */ |
@@ -2639,7 +2639,7 @@ static const struct net_device_ops hme_netdev_ops = { | |||
2639 | }; | 2639 | }; |
2640 | 2640 | ||
2641 | #ifdef CONFIG_SBUS | 2641 | #ifdef CONFIG_SBUS |
2642 | static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | 2642 | static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe) |
2643 | { | 2643 | { |
2644 | struct device_node *dp = op->dev.of_node, *sbus_dp; | 2644 | struct device_node *dp = op->dev.of_node, *sbus_dp; |
2645 | struct quattro *qp = NULL; | 2645 | struct quattro *qp = NULL; |
@@ -2648,7 +2648,7 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2648 | int i, qfe_slot = -1; | 2648 | int i, qfe_slot = -1; |
2649 | int err = -ENODEV; | 2649 | int err = -ENODEV; |
2650 | 2650 | ||
2651 | sbus_dp = to_of_device(op->dev.parent)->dev.of_node; | 2651 | sbus_dp = op->dev.parent->of_node; |
2652 | 2652 | ||
2653 | /* We can match PCI devices too, do not accept those here. */ | 2653 | /* We can match PCI devices too, do not accept those here. */ |
2654 | if (strcmp(sbus_dp->name, "sbus")) | 2654 | if (strcmp(sbus_dp->name, "sbus")) |
@@ -2790,7 +2790,7 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
2790 | /* Happy Meal can do it all... */ | 2790 | /* Happy Meal can do it all... */ |
2791 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; | 2791 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; |
2792 | 2792 | ||
2793 | dev->irq = op->irqs[0]; | 2793 | dev->irq = op->archdata.irqs[0]; |
2794 | 2794 | ||
2795 | #if defined(CONFIG_SBUS) && defined(CONFIG_PCI) | 2795 | #if defined(CONFIG_SBUS) && defined(CONFIG_PCI) |
2796 | /* Hook up SBUS register/descriptor accessors. */ | 2796 | /* Hook up SBUS register/descriptor accessors. */ |
@@ -3235,7 +3235,7 @@ static void happy_meal_pci_exit(void) | |||
3235 | #endif | 3235 | #endif |
3236 | 3236 | ||
3237 | #ifdef CONFIG_SBUS | 3237 | #ifdef CONFIG_SBUS |
3238 | static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) | 3238 | static int __devinit hme_sbus_probe(struct platform_device *op, const struct of_device_id *match) |
3239 | { | 3239 | { |
3240 | struct device_node *dp = op->dev.of_node; | 3240 | struct device_node *dp = op->dev.of_node; |
3241 | const char *model = of_get_property(dp, "model", NULL); | 3241 | const char *model = of_get_property(dp, "model", NULL); |
@@ -3247,7 +3247,7 @@ static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device | |||
3247 | return happy_meal_sbus_probe_one(op, is_qfe); | 3247 | return happy_meal_sbus_probe_one(op, is_qfe); |
3248 | } | 3248 | } |
3249 | 3249 | ||
3250 | static int __devexit hme_sbus_remove(struct of_device *op) | 3250 | static int __devexit hme_sbus_remove(struct platform_device *op) |
3251 | { | 3251 | { |
3252 | struct happy_meal *hp = dev_get_drvdata(&op->dev); | 3252 | struct happy_meal *hp = dev_get_drvdata(&op->dev); |
3253 | struct net_device *net_dev = hp->dev; | 3253 | struct net_device *net_dev = hp->dev; |
@@ -3304,7 +3304,7 @@ static int __init happy_meal_sbus_init(void) | |||
3304 | { | 3304 | { |
3305 | int err; | 3305 | int err; |
3306 | 3306 | ||
3307 | err = of_register_driver(&hme_sbus_driver, &of_bus_type); | 3307 | err = of_register_platform_driver(&hme_sbus_driver); |
3308 | if (!err) | 3308 | if (!err) |
3309 | err = quattro_sbus_register_irqs(); | 3309 | err = quattro_sbus_register_irqs(); |
3310 | 3310 | ||
@@ -3313,7 +3313,7 @@ static int __init happy_meal_sbus_init(void) | |||
3313 | 3313 | ||
3314 | static void happy_meal_sbus_exit(void) | 3314 | static void happy_meal_sbus_exit(void) |
3315 | { | 3315 | { |
3316 | of_unregister_driver(&hme_sbus_driver); | 3316 | of_unregister_platform_driver(&hme_sbus_driver); |
3317 | quattro_sbus_free_irqs(); | 3317 | quattro_sbus_free_irqs(); |
3318 | 3318 | ||
3319 | while (qfe_sbus_list) { | 3319 | while (qfe_sbus_list) { |