Re: [PATCH 1/2] usb/udc-core: wire up sysfs files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Jun 21, 2011 at 07:38:53PM +0200, Sebastian Andrzej Siewior wrote:
> This was somehow forgotten.
> 
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> ---
>  drivers/usb/gadget/udc-core.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c
> index 2ddb7c8..08221fa 100644
> --- a/drivers/usb/gadget/udc-core.c
> +++ b/drivers/usb/gadget/udc-core.c
> @@ -44,7 +44,6 @@ struct usb_udc {
>  };
>  
>  static struct class *udc_class;
> -static struct device_type udc_device_type;
>  static LIST_HEAD(udc_list);
>  static DEFINE_MUTEX(udc_lock);
>  
> @@ -144,6 +143,7 @@ static void usb_udc_release(struct device *dev)
>  	kfree(udc);
>  }
>  
> +static const struct attribute_group *usb_udc_attr_groups[];
>  /**
>   * usb_add_gadget_udc - adds a new gadget to the udc class driver list
>   * @parent: the parent device to this udc. Usually the controller
> @@ -164,6 +164,7 @@ int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget)
>  	device_initialize(&udc->dev);
>  	udc->dev.release = usb_udc_release;
>  	udc->dev.class = udc_class;
> +	udc->dev.groups = usb_udc_attr_groups;
>  	udc->dev.parent = parent;
>  	ret = dev_set_name(&udc->dev, "%s", kobject_name(&parent->kobj));
>  	if (ret)
> @@ -468,8 +469,6 @@ static int __init usb_udc_init(void)
>  	}
>  
>  	udc_class->dev_uevent = usb_udc_uevent;
> -	udc_device_type.groups = usb_udc_attr_groups;
> -
>  	return 0;
>  }
>  subsys_initcall(usb_udc_init);

I wonder if it would be simpler to just assign the device type
correctly ?

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux