[V4 PATCH 18/26] usb: phy: mv_usb2_phy: add externel chip support

Felipe Balbi balbi at ti.com
Wed Jan 23 06:47:25 EST 2013


Hi,

On Tue, Jan 22, 2013 at 10:51:32AM +0800, Chao Xie wrote:
> On Mon, Jan 21, 2013 at 11:51 PM, Russell King - ARM Linux
> <linux at arm.linux.org.uk> wrote:
> > On Mon, Jan 21, 2013 at 05:07:36AM -0500, Chao Xie wrote:
> >> +     mv_phy->extern_chip.head = devm_kzalloc(&pdev->dev,
> >> +                                     sizeof(*mv_phy->extern_chip.head),
> >> +                                     GFP_KERNEL);
> >> +     if (mv_phy->extern_chip.head == NULL)
> >> +             return -ENOMEM;
> >> +     ATOMIC_INIT_NOTIFIER_HEAD(mv_phy->extern_chip.head);
> >
> > Why do you need to allocate an atomic notifier list head as an entirely
> > separate data structure?
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> > the body of a message to majordomo at vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> Th reason is that the original code seperate the extern_chip and phy
> support. So it depends
> on the ->head to detect whether extern_chip is initialized or not.
> Now it is combined with phy, the ->phy pointer can do the job.

does that need to be dynamically allocated ?

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130123/36addcdc/attachment.sig>


More information about the linux-arm-kernel mailing list