diff options
author | David S. Miller <davem@davemloft.net> | 2010-09-09 02:49:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-09 02:49:04 -0400 |
commit | e199e6136ce6b151e6638ae93dca60748424d900 (patch) | |
tree | 0d66e0b5d227c36b005e4f5537f4bbcfc6ed4904 /drivers/net/niu.c | |
parent | 972c40b5bee429c84ba727f8ac0a08292bc5dc3d (diff) | |
parent | d56557af19867edb8c0e96f8e26399698a08857f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r-- | drivers/net/niu.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 340cbec48943..fe6983af6918 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -28,10 +28,7 @@ | |||
28 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
29 | 29 | ||
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | |||
32 | #ifdef CONFIG_SPARC64 | ||
33 | #include <linux/of_device.h> | 31 | #include <linux/of_device.h> |
34 | #endif | ||
35 | 32 | ||
36 | #include "niu.h" | 33 | #include "niu.h" |
37 | 34 | ||
@@ -9102,7 +9099,7 @@ retry: | |||
9102 | static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) | 9099 | static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) |
9103 | { | 9100 | { |
9104 | #ifdef CONFIG_SPARC64 | 9101 | #ifdef CONFIG_SPARC64 |
9105 | struct of_device *op = np->op; | 9102 | struct platform_device *op = np->op; |
9106 | const u32 *int_prop; | 9103 | const u32 *int_prop; |
9107 | int i; | 9104 | int i; |
9108 | 9105 | ||
@@ -9110,12 +9107,12 @@ static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) | |||
9110 | if (!int_prop) | 9107 | if (!int_prop) |
9111 | return -ENODEV; | 9108 | return -ENODEV; |
9112 | 9109 | ||
9113 | for (i = 0; i < op->num_irqs; i++) { | 9110 | for (i = 0; i < op->archdata.num_irqs; i++) { |
9114 | ldg_num_map[i] = int_prop[i]; | 9111 | ldg_num_map[i] = int_prop[i]; |
9115 | np->ldg[i].irq = op->irqs[i]; | 9112 | np->ldg[i].irq = op->archdata.irqs[i]; |
9116 | } | 9113 | } |
9117 | 9114 | ||
9118 | np->num_ldg = op->num_irqs; | 9115 | np->num_ldg = op->archdata.num_irqs; |
9119 | 9116 | ||
9120 | return 0; | 9117 | return 0; |
9121 | #else | 9118 | #else |
@@ -9687,7 +9684,7 @@ static void __devinit niu_driver_version(void) | |||
9687 | 9684 | ||
9688 | static struct net_device * __devinit niu_alloc_and_init( | 9685 | static struct net_device * __devinit niu_alloc_and_init( |
9689 | struct device *gen_dev, struct pci_dev *pdev, | 9686 | struct device *gen_dev, struct pci_dev *pdev, |
9690 | struct of_device *op, const struct niu_ops *ops, | 9687 | struct platform_device *op, const struct niu_ops *ops, |
9691 | u8 port) | 9688 | u8 port) |
9692 | { | 9689 | { |
9693 | struct net_device *dev; | 9690 | struct net_device *dev; |
@@ -10063,7 +10060,7 @@ static const struct niu_ops niu_phys_ops = { | |||
10063 | .unmap_single = niu_phys_unmap_single, | 10060 | .unmap_single = niu_phys_unmap_single, |
10064 | }; | 10061 | }; |
10065 | 10062 | ||
10066 | static int __devinit niu_of_probe(struct of_device *op, | 10063 | static int __devinit niu_of_probe(struct platform_device *op, |
10067 | const struct of_device_id *match) | 10064 | const struct of_device_id *match) |
10068 | { | 10065 | { |
10069 | union niu_parent_id parent_id; | 10066 | union niu_parent_id parent_id; |
@@ -10178,7 +10175,7 @@ err_out: | |||
10178 | return err; | 10175 | return err; |
10179 | } | 10176 | } |
10180 | 10177 | ||
10181 | static int __devexit niu_of_remove(struct of_device *op) | 10178 | static int __devexit niu_of_remove(struct platform_device *op) |
10182 | { | 10179 | { |
10183 | struct net_device *dev = dev_get_drvdata(&op->dev); | 10180 | struct net_device *dev = dev_get_drvdata(&op->dev); |
10184 | 10181 | ||
@@ -10245,14 +10242,14 @@ static int __init niu_init(void) | |||
10245 | niu_debug = netif_msg_init(debug, NIU_MSG_DEFAULT); | 10242 | niu_debug = netif_msg_init(debug, NIU_MSG_DEFAULT); |
10246 | 10243 | ||
10247 | #ifdef CONFIG_SPARC64 | 10244 | #ifdef CONFIG_SPARC64 |
10248 | err = of_register_driver(&niu_of_driver, &of_bus_type); | 10245 | err = of_register_platform_driver(&niu_of_driver); |
10249 | #endif | 10246 | #endif |
10250 | 10247 | ||
10251 | if (!err) { | 10248 | if (!err) { |
10252 | err = pci_register_driver(&niu_pci_driver); | 10249 | err = pci_register_driver(&niu_pci_driver); |
10253 | #ifdef CONFIG_SPARC64 | 10250 | #ifdef CONFIG_SPARC64 |
10254 | if (err) | 10251 | if (err) |
10255 | of_unregister_driver(&niu_of_driver); | 10252 | of_unregister_platform_driver(&niu_of_driver); |
10256 | #endif | 10253 | #endif |
10257 | } | 10254 | } |
10258 | 10255 | ||
@@ -10263,7 +10260,7 @@ static void __exit niu_exit(void) | |||
10263 | { | 10260 | { |
10264 | pci_unregister_driver(&niu_pci_driver); | 10261 | pci_unregister_driver(&niu_pci_driver); |
10265 | #ifdef CONFIG_SPARC64 | 10262 | #ifdef CONFIG_SPARC64 |
10266 | of_unregister_driver(&niu_of_driver); | 10263 | of_unregister_platform_driver(&niu_of_driver); |
10267 | #endif | 10264 | #endif |
10268 | } | 10265 | } |
10269 | 10266 | ||