]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/chelsio/my3126.c
Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / drivers / net / chelsio / my3126.c
index 0b90014d5b3e7a4d19f032c679b57c72a3b98f59..82fed1dd5005525b1fdbc44d78db6de46e33d6f6 100644 (file)
@@ -93,9 +93,11 @@ static int my3126_interrupt_handler(struct cphy *cphy)
        return cphy_cause_link_change;
 }
 
-static void my3216_poll(void *arg)
+static void my3216_poll(struct work_struct *work)
 {
-       my3126_interrupt_handler(arg);
+       struct cphy *cphy = container_of(work, struct cphy, phy_update.work);
+
+       my3126_interrupt_handler(cphy);
 }
 
 static int my3126_set_loopback(struct cphy *cphy, int on)
@@ -168,10 +170,11 @@ static struct cphy *my3126_phy_create(adapter_t *adapter,
 {
        struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL);
 
-       if (cphy)
-               cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops);
+       if (!cphy)
+               return NULL;
 
-       INIT_WORK(&cphy->phy_update, my3216_poll, cphy);
+       cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops);
+       INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll);
        cphy->bmsr = 0;
 
        return (cphy);