From 35644b0cce0ab8735944dcbfceb19e9e65da9a3d Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 17 Jan 2006 11:16:13 +0100 Subject: [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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/atm/speedtch.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/usb/atm/speedtch.c') diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 211d467311e..7b60d159dbe 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 static int speedtch_bind(struct usbatm_data *usbatm, struct usb_interface *intf, - const struct usb_device_id *id, - int *need_heavy_init) + const struct usb_device_id *id) { struct usb_device *usb_dev = interface_to_usbdev(intf); struct usb_interface *cur_intf; @@ -754,11 +753,11 @@ static int speedtch_bind(struct usbatm_data *usbatm, 0x12, 0xc0, 0x07, 0x00, instance->scratch_buffer + OFFSET_7, SIZE_7, 500); - *need_heavy_init = (ret != SIZE_7); + usbatm->flags = (ret == SIZE_7 ? UDSL_SKIP_HEAVY_INIT : 0); - usb_dbg(usbatm, "%s: firmware %s loaded\n", __func__, need_heavy_init ? "not" : "already"); + usb_dbg(usbatm, "%s: firmware %s loaded\n", __func__, usbatm->flags & UDSL_SKIP_HEAVY_INIT ? "already" : "not"); - if (*need_heavy_init) + if (!(usbatm->flags & UDSL_SKIP_HEAVY_INIT)) if ((ret = usb_reset_device(usb_dev)) < 0) { usb_err(usbatm, "%s: device reset failed (%d)!\n", __func__, ret); goto fail_free; -- cgit v1.2.3