]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: skge: convert tasklets to use new tasklet_setup() API
authorAllen Pais <apais@linux.microsoft.com>
Mon, 14 Sep 2020 07:29:31 +0000 (12:59 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Sep 2020 20:02:37 +0000 (13:02 -0700)
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/skge.c

index 6a930351cb239d4b330076d2446cb62f674d6f74..8a9c0f490bfb5a95460ca712e89729a71d12e001 100644 (file)
@@ -3338,9 +3338,9 @@ static void skge_error_irq(struct skge_hw *hw)
  * because accessing phy registers requires spin wait which might
  * cause excess interrupt latency.
  */
-static void skge_extirq(unsigned long arg)
+static void skge_extirq(struct tasklet_struct *t)
 {
-       struct skge_hw *hw = (struct skge_hw *) arg;
+       struct skge_hw *hw = from_tasklet(hw, t, phy_task);
        int port;
 
        for (port = 0; port < hw->ports; port++) {
@@ -3927,7 +3927,7 @@ static int skge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        hw->pdev = pdev;
        spin_lock_init(&hw->hw_lock);
        spin_lock_init(&hw->phy_lock);
-       tasklet_init(&hw->phy_task, skge_extirq, (unsigned long) hw);
+       tasklet_setup(&hw->phy_task, skge_extirq);
 
        hw->regs = ioremap(pci_resource_start(pdev, 0), 0x4000);
        if (!hw->regs) {