aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/r8169.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
committerDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
commitc4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch)
tree1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/net/r8169.c
parent65f27f38446e1976cc98fd3004b110fedcddd189 (diff)
WorkStruct: make allyesconfig
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r--drivers/net/r8169.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 27f90b2139c0..1f9663a70823 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -424,6 +424,7 @@ struct ring_info {
424struct rtl8169_private { 424struct rtl8169_private {
425 void __iomem *mmio_addr; /* memory map physical address */ 425 void __iomem *mmio_addr; /* memory map physical address */
426 struct pci_dev *pci_dev; /* Index of PCI device */ 426 struct pci_dev *pci_dev; /* Index of PCI device */
427 struct net_device *dev;
427 struct net_device_stats stats; /* statistics of net device */ 428 struct net_device_stats stats; /* statistics of net device */
428 spinlock_t lock; /* spin lock flag */ 429 spinlock_t lock; /* spin lock flag */
429 u32 msg_enable; 430 u32 msg_enable;
@@ -455,7 +456,7 @@ struct rtl8169_private {
455 void (*phy_reset_enable)(void __iomem *); 456 void (*phy_reset_enable)(void __iomem *);
456 unsigned int (*phy_reset_pending)(void __iomem *); 457 unsigned int (*phy_reset_pending)(void __iomem *);
457 unsigned int (*link_ok)(void __iomem *); 458 unsigned int (*link_ok)(void __iomem *);
458 struct work_struct task; 459 struct delayed_work task;
459 unsigned wol_enabled : 1; 460 unsigned wol_enabled : 1;
460}; 461};
461 462
@@ -1492,6 +1493,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1492 SET_MODULE_OWNER(dev); 1493 SET_MODULE_OWNER(dev);
1493 SET_NETDEV_DEV(dev, &pdev->dev); 1494 SET_NETDEV_DEV(dev, &pdev->dev);
1494 tp = netdev_priv(dev); 1495 tp = netdev_priv(dev);
1496 tp->dev = dev;
1495 tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT); 1497 tp->msg_enable = netif_msg_init(debug.msg_enable, R8169_MSG_DEFAULT);
1496 1498
1497 /* enable device (incl. PCI PM wakeup and hotplug setup) */ 1499 /* enable device (incl. PCI PM wakeup and hotplug setup) */
@@ -1764,7 +1766,7 @@ static int rtl8169_open(struct net_device *dev)
1764 if (retval < 0) 1766 if (retval < 0)
1765 goto err_free_rx; 1767 goto err_free_rx;
1766 1768
1767 INIT_WORK(&tp->task, NULL, dev); 1769 INIT_DELAYED_WORK(&tp->task, NULL);
1768 1770
1769 rtl8169_hw_start(dev); 1771 rtl8169_hw_start(dev);
1770 1772
@@ -2087,11 +2089,11 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)
2087 tp->cur_tx = tp->dirty_tx = 0; 2089 tp->cur_tx = tp->dirty_tx = 0;
2088} 2090}
2089 2091
2090static void rtl8169_schedule_work(struct net_device *dev, void (*task)(void *)) 2092static void rtl8169_schedule_work(struct net_device *dev, work_func_t task)
2091{ 2093{
2092 struct rtl8169_private *tp = netdev_priv(dev); 2094 struct rtl8169_private *tp = netdev_priv(dev);
2093 2095
2094 PREPARE_WORK(&tp->task, task, dev); 2096 PREPARE_DELAYED_WORK(&tp->task, task);
2095 schedule_delayed_work(&tp->task, 4); 2097 schedule_delayed_work(&tp->task, 4);
2096} 2098}
2097 2099
@@ -2110,9 +2112,11 @@ static void rtl8169_wait_for_quiescence(struct net_device *dev)
2110 netif_poll_enable(dev); 2112 netif_poll_enable(dev);
2111} 2113}
2112 2114
2113static void rtl8169_reinit_task(void *_data) 2115static void rtl8169_reinit_task(struct work_struct *work)
2114{ 2116{
2115 struct net_device *dev = _data; 2117 struct rtl8169_private *tp =
2118 container_of(work, struct rtl8169_private, task.work);
2119 struct net_device *dev = tp->dev;
2116 int ret; 2120 int ret;
2117 2121
2118 if (netif_running(dev)) { 2122 if (netif_running(dev)) {
@@ -2135,10 +2139,11 @@ static void rtl8169_reinit_task(void *_data)
2135 } 2139 }
2136} 2140}
2137 2141
2138static void rtl8169_reset_task(void *_data) 2142static void rtl8169_reset_task(struct work_struct *work)
2139{ 2143{
2140 struct net_device *dev = _data; 2144 struct rtl8169_private *tp =
2141 struct rtl8169_private *tp = netdev_priv(dev); 2145 container_of(work, struct rtl8169_private, task.work);
2146 struct net_device *dev = tp->dev;
2142 2147
2143 if (!netif_running(dev)) 2148 if (!netif_running(dev))
2144 return; 2149 return;