Re: [PATCH/RFC] Runtime PM: ARM: subarch-specific extensions of pdev_archdata

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

 



Mikael Pettersson wrote:
> Eric Miao writes:
>  > On Wed, Sep 23, 2009 at 9:50 AM, Kevin Hilman
>  > <khilman@xxxxxxxxxxxxxxxxxxx> wrote:
>  > > On ARM platforms, power management can be very platform specific.
>  > > This patch allows ARM subarches to extend the platform_device
>  > > pdev_archdata for each subarch by creating a new struct pdev_machdata
>  > > and allowing each subarch to customize it as needed.
>  > >
>  > > As a starting point, each subarch's <mach/device.h> creates an empty
>  > > struct pdev_machdata.
>  > >
>  > 
>  > Shouldn't that pdev_archdata and pdev_machdata be pointer or something
>  > so that multiple platform_device can share something in common?
> 
> Forcing it to be a pointer has allocation and lifetime implications.
> Making it a struct allows the subarch to duplicate or share
> (via a private pointer) data as it sees fit.

Yes, the allocation/lifetime issues were why a struct was chosen.

Kevin
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux