Re: [PATCH 07/28] usb: musb: use platform_driver_register to register musb_hdrc driver

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

 



2010/12/13 Felipe Balbi <balbi@xxxxxx>:
> On Mon, Dec 13, 2010 at 01:01:47AM +0800, tom.leiming@xxxxxxxxx wrote:
>>
>> From: Ming Lei <tom.leiming@xxxxxxxxx>
>>
>> Since hw glue drivers may depend on musb_hdrc and musb_init will return
>> failure if no glue device is registered, this patch fixes the issue
>> by registering musb_hdrc driver first.
>
> don't do that. We want the glue layer to be registered first as it will
> setup the platform_device for musb and setup the platform_data, enable
> clocks, etc.
>
> NAK

If we want to compile glue layer as module, we must load musb_hdrc
first since glue layers depend on musb_hdrc. (It is a very reasonable
model, that specific/concrete device modules depend on musb core driver,
which is more generic)

I change platform_driver_probe to platform_driver_register,  which not
cause .probe of musb_hdrc called until 'musb_hdrc' device is created.

So the patch doesn't change the running order between .probe of glue and
.probe of musb_hdrc, and first is .probe of glue always, musb_hdrc .probe
is second.

So I think the patch is correct, and does make sense.

-- 
Lei Ming
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux