diff options
author | Timur Tabi <timur@freescale.com> | 2007-01-09 13:31:38 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-18 12:03:48 -0500 |
commit | df19b6b020791b4c42e7cf2e4f582454cbc49251 (patch) | |
tree | afe701ed2b38cc4bd3f4196fb618f4fe6872d7dd /drivers/net | |
parent | b2db8dd4fdce7f31aa72a854e2433108d474ebb2 (diff) |
Update ucc_geth.c for new workqueue structure
The workqueue interface changed with David Howell's patch on 11/22/2006
(SHA 65f27f38446e1976cc98fd3004b110fedcddd189). Several drivers were
updated with that patch to handle the new interface, but ucc_geth.c
was not one of them. This patch updates ucc_geth.c to support the new
model.
A compiler warning in set_mac_addr() was also fixed.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ucc_geth.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 8243150f5b05..7e4b23c7c1ba 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/fsl_devices.h> | 29 | #include <linux/fsl_devices.h> |
30 | #include <linux/ethtool.h> | 30 | #include <linux/ethtool.h> |
31 | #include <linux/mii.h> | 31 | #include <linux/mii.h> |
32 | #include <linux/workqueue.h> | ||
32 | 33 | ||
33 | #include <asm/of_platform.h> | 34 | #include <asm/of_platform.h> |
34 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
@@ -472,7 +473,7 @@ static void put_enet_addr_container(struct enet_addr_container *enet_addr_cont) | |||
472 | kfree(enet_addr_cont); | 473 | kfree(enet_addr_cont); |
473 | } | 474 | } |
474 | 475 | ||
475 | static int set_mac_addr(__be16 __iomem *reg, u8 *mac) | 476 | static void set_mac_addr(__be16 __iomem *reg, u8 *mac) |
476 | { | 477 | { |
477 | out_be16(®[0], ((u16)mac[5] << 8) | mac[4]); | 478 | out_be16(®[0], ((u16)mac[5] << 8) | mac[4]); |
478 | out_be16(®[1], ((u16)mac[3] << 8) | mac[2]); | 479 | out_be16(®[1], ((u16)mac[3] << 8) | mac[2]); |
@@ -3920,10 +3921,11 @@ static irqreturn_t phy_interrupt(int irq, void *dev_id) | |||
3920 | } | 3921 | } |
3921 | 3922 | ||
3922 | /* Scheduled by the phy_interrupt/timer to handle PHY changes */ | 3923 | /* Scheduled by the phy_interrupt/timer to handle PHY changes */ |
3923 | static void ugeth_phy_change(void *data) | 3924 | static void ugeth_phy_change(struct work_struct *work) |
3924 | { | 3925 | { |
3925 | struct net_device *dev = (struct net_device *)data; | 3926 | struct ucc_geth_private *ugeth = |
3926 | struct ucc_geth_private *ugeth = netdev_priv(dev); | 3927 | container_of(work, struct ucc_geth_private, tq); |
3928 | struct net_device *dev = ugeth->dev; | ||
3927 | struct ucc_geth *ug_regs; | 3929 | struct ucc_geth *ug_regs; |
3928 | int result = 0; | 3930 | int result = 0; |
3929 | 3931 | ||
@@ -4080,7 +4082,7 @@ static int ucc_geth_open(struct net_device *dev) | |||
4080 | #endif /* CONFIG_UGETH_NAPI */ | 4082 | #endif /* CONFIG_UGETH_NAPI */ |
4081 | 4083 | ||
4082 | /* Set up the PHY change work queue */ | 4084 | /* Set up the PHY change work queue */ |
4083 | INIT_WORK(&ugeth->tq, ugeth_phy_change, dev); | 4085 | INIT_WORK(&ugeth->tq, ugeth_phy_change); |
4084 | 4086 | ||
4085 | init_timer(&ugeth->phy_info_timer); | 4087 | init_timer(&ugeth->phy_info_timer); |
4086 | ugeth->phy_info_timer.function = &ugeth_phy_startup_timer; | 4088 | ugeth->phy_info_timer.function = &ugeth_phy_startup_timer; |