Subject: Re: remove special ioctl from hso driver, replace by rfkill

From: Greg KH <[email-masked]>
Date: Thu, 17 Apr 2008 15:39:29 -0700

On Fri, Apr 18, 2008 at 12:42:07AM +0300, Paulius Zaleckas wrote:
> Oliver Neukum wrote:
>>  /* called once for each interface upon device insertion */
>>  static int hso_probe(struct usb_interface *interface,
>>  		     const struct usb_device_id *id)
>>  {
>>  	int mux, i, if_num, port_spec;
>>  	unsigned char port_mask;
>> +	char *rfkn;
>>  	struct hso_device *hso_dev = NULL;
>>  	struct hso_shared_int *shared_int = NULL;
>>  	struct hso_device *tmp_dev = NULL;
>> @@ -2747,6 +2706,27 @@ static int hso_probe(struct usb_interfac
>>  		goto exit;
>>  	}
>>  +	hso_dev->rfkill = rfkill_allocate(&interface_to_usbdev(interface)->dev,
>> +				RFKILL_TYPE_WLAN);
>
> What will happen if rfkill is not enabled on kernel? I think HSO should
> not depend on rfkill. Solution should be to do #ifdef CONFIG_RFKILL..?

Ick, rfkill should degrade properly so that #ifdefs are not needed here.
I'll fix up rfkill.h to prevent this kind of dependancy requirement.

thanks,

greg k-h