]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
[PATCH] ... and more work_struct-induced breakage (mips)
authorAl Viro <viro@ftp.linux.org.uk>
Wed, 6 Dec 2006 19:50:06 +0000 (19:50 +0000)
committerLinus Torvalds <torvalds@woody.osdl.org>
Wed, 6 Dec 2006 22:51:14 +0000 (14:51 -0800)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/i2c/chips/m41t00.c
drivers/net/mv643xx_eth.c

index 2dd0a34d9472e17496dff2692aec74cd5cd3ac61..420377c86422b229008e11361e079cca6556346e 100644 (file)
@@ -215,8 +215,15 @@ m41t00_set(void *arg)
 }
 
 static ulong new_time;
+/* well, isn't this API just _lovely_? */
+static void
+m41t00_barf(struct work_struct *unusable)
+{
+       m41t00_set(&new_time);
+}
+
 static struct workqueue_struct *m41t00_wq;
-static DECLARE_WORK(m41t00_work, m41t00_set, &new_time);
+static DECLARE_WORK(m41t00_work, m41t00_barf);
 
 int
 m41t00_set_rtc_time(ulong nowtime)
index 9997081c6daea8458fd1b1fad296733f55885dcd..d9f48bb04b0544af17f8f2d47ad40052d9ca6027 100644 (file)
@@ -277,9 +277,11 @@ static void mv643xx_eth_tx_timeout(struct net_device *dev)
  *
  * Actual routine to reset the adapter when a timeout on Tx has occurred
  */
-static void mv643xx_eth_tx_timeout_task(struct net_device *dev)
+static void mv643xx_eth_tx_timeout_task(struct work_struct *ugly)
 {
-       struct mv643xx_private *mp = netdev_priv(dev);
+       struct mv643xx_private *mp = container_of(ugly, struct mv643xx_private,
+                                                 tx_timeout_task);
+       struct net_device *dev = mp->mii.dev; /* yuck */
 
        if (!netif_running(dev))
                return;
@@ -1360,8 +1362,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
 #endif
 
        /* Configure the timeout task */
-       INIT_WORK(&mp->tx_timeout_task,
-                       (void (*)(void *))mv643xx_eth_tx_timeout_task, dev);
+       INIT_WORK(&mp->tx_timeout_task, mv643xx_eth_tx_timeout_task);
 
        spin_lock_init(&mp->lock);