]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/net/wireless/marvell/libertas_tf/if_usb.c
libertas_tf: move hardware callbacks to a separate structure
[linux.git] / drivers / net / wireless / marvell / libertas_tf / if_usb.c
index 6ede6168bd85a2b98c1fb7b2246571b93f0ad2ce..7a5a1a85dcf76561e0e62b66357e18cd3b0f0e81 100644 (file)
@@ -131,6 +131,12 @@ static void if_usb_fw_timeo(struct timer_list *t)
        lbtf_deb_leave(LBTF_DEB_USB);
 }
 
+static const struct lbtf_ops if_usb_ops = {
+       .hw_host_to_card = if_usb_host_to_card,
+       .hw_prog_firmware = if_usb_prog_firmware,
+       .hw_reset_device = if_usb_reset_device,
+};
+
 /**
  *  if_usb_probe - sets the configuration values
  *
@@ -216,15 +222,11 @@ static int if_usb_probe(struct usb_interface *intf,
                goto dealloc;
        }
 
-       priv = lbtf_add_card(cardp, &udev->dev);
+       priv = lbtf_add_card(cardp, &udev->dev, &if_usb_ops);
        if (!priv)
                goto dealloc;
 
        cardp->priv = priv;
-
-       priv->hw_host_to_card = if_usb_host_to_card;
-       priv->hw_prog_firmware = if_usb_prog_firmware;
-       priv->hw_reset_device = if_usb_reset_device;
        cardp->boot2_version = udev->descriptor.bcdDevice;
 
        usb_get_dev(udev);