diff options
author | Duncan Sands <baldrick@free.fr> | 2006-01-17 05:16:13 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-31 20:23:39 -0500 |
commit | 35644b0cce0ab8735944dcbfceb19e9e65da9a3d (patch) | |
tree | caa13c8519c7417fa0adf173cec98b994745c79f /drivers/usb/atm/speedtch.c | |
parent | 0ec3c7e856319b600311750d784262caa8ed94b9 (diff) |
[PATCH] USBATM: add flags field
Have minidrivers and the core signal special requirements
using a flags field in struct usbatm_data. For the moment
this is only used to replace the need_heavy_init bind
parameter, but there'll be new flags in later patches.
Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm/speedtch.c')
-rw-r--r-- | drivers/usb/atm/speedtch.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 211d467311e2..7b60d159dbed 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c | |||
@@ -681,8 +681,7 @@ static void speedtch_release_interfaces(struct usb_device *usb_dev, int num_inte | |||
681 | 681 | ||
682 | static int speedtch_bind(struct usbatm_data *usbatm, | 682 | static int speedtch_bind(struct usbatm_data *usbatm, |
683 | struct usb_interface *intf, | 683 | struct usb_interface *intf, |
684 | const struct usb_device_id *id, | 684 | const struct usb_device_id *id) |
685 | int *need_heavy_init) | ||
686 | { | 685 | { |
687 | struct usb_device *usb_dev = interface_to_usbdev(intf); | 686 | struct usb_device *usb_dev = interface_to_usbdev(intf); |
688 | struct usb_interface *cur_intf; | 687 | struct usb_interface *cur_intf; |
@@ -754,11 +753,11 @@ static int speedtch_bind(struct usbatm_data *usbatm, | |||
754 | 0x12, 0xc0, 0x07, 0x00, | 753 | 0x12, 0xc0, 0x07, 0x00, |
755 | instance->scratch_buffer + OFFSET_7, SIZE_7, 500); | 754 | instance->scratch_buffer + OFFSET_7, SIZE_7, 500); |
756 | 755 | ||
757 | *need_heavy_init = (ret != SIZE_7); | 756 | usbatm->flags = (ret == SIZE_7 ? UDSL_SKIP_HEAVY_INIT : 0); |
758 | 757 | ||
759 | usb_dbg(usbatm, "%s: firmware %s loaded\n", __func__, need_heavy_init ? "not" : "already"); | 758 | usb_dbg(usbatm, "%s: firmware %s loaded\n", __func__, usbatm->flags & UDSL_SKIP_HEAVY_INIT ? "already" : "not"); |
760 | 759 | ||
761 | if (*need_heavy_init) | 760 | if (!(usbatm->flags & UDSL_SKIP_HEAVY_INIT)) |
762 | if ((ret = usb_reset_device(usb_dev)) < 0) { | 761 | if ((ret = usb_reset_device(usb_dev)) < 0) { |
763 | usb_err(usbatm, "%s: device reset failed (%d)!\n", __func__, ret); | 762 | usb_err(usbatm, "%s: device reset failed (%d)!\n", __func__, ret); |
764 | goto fail_free; | 763 | goto fail_free; |