diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:21:04 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:21:04 -0500 |
commit | 988addf82e4c03739375279de73929580a2d4a6a (patch) | |
tree | 989ae1cd4e264bbad80c65f04480486246e7b9f3 /drivers/usb/atm/usbatm.h | |
parent | 004c1c7096659d352b83047a7593e91d8a30e3c5 (diff) | |
parent | 25cf84cf377c0aae5dbcf937ea89bc7893db5176 (diff) |
Merge branch 'origin' into devel-stable
Conflicts:
arch/arm/mach-mx2/devices.c
arch/arm/mach-mx2/devices.h
sound/soc/pxa/pxa-ssp.c
Diffstat (limited to 'drivers/usb/atm/usbatm.h')
-rw-r--r-- | drivers/usb/atm/usbatm.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h index f6f4508a9d42..0863f85fcc26 100644 --- a/drivers/usb/atm/usbatm.h +++ b/drivers/usb/atm/usbatm.h | |||
@@ -204,4 +204,19 @@ struct usbatm_data { | |||
204 | struct urb *urbs[0]; | 204 | struct urb *urbs[0]; |
205 | }; | 205 | }; |
206 | 206 | ||
207 | static inline void *to_usbatm_driver_data(struct usb_interface *intf) | ||
208 | { | ||
209 | struct usbatm_data *usbatm_instance; | ||
210 | |||
211 | if (intf == NULL) | ||
212 | return NULL; | ||
213 | |||
214 | usbatm_instance = usb_get_intfdata(intf); | ||
215 | |||
216 | if (usbatm_instance == NULL) /* set NULL before unbind() */ | ||
217 | return NULL; | ||
218 | |||
219 | return usbatm_instance->driver_data; /* set NULL after unbind() */ | ||
220 | } | ||
221 | |||
207 | #endif /* _USBATM_H_ */ | 222 | #endif /* _USBATM_H_ */ |