Re: [PATCH 3/8] cxacru: check device isn't being removed during sysfscalls

From: Simon Arlott
Date: Sat Nov 21 2009 - 10:29:48 EST


On 21/11/09 15:24, Duncan Sands wrote:
>> +static inline void *to_usbatm_driver_data(struct usb_interface *intf)
>> +static inline void *to_usbatm_atm_dev(struct usb_interface *intf)
>
> why not collapse these two into one that just returns usbatm_instance,
> and have users extract the ->driver_data or ->atm_dev fields?

I didn't feel that the driver(s) should be accessing the fields from
usbatm_instance directly to get at atm_dev. Although this new atm_dev
function only has one caller, and cxacru already access atm_dev directly
in cxacru_poll_status() so I'll remove the second function and access
cxacru_data's usbatm pointer, which won't be NULL.

--
Simon Arlott
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/