lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 5 Jun 2009 12:07:56 +0900
From:	Magnus Damm <>
To:	"Rafael J. Wysocki" <>
Subject: Re: [PATCH] Driver Core: Add platform device arch data V2

On Wed, Jun 3, 2009 at 6:01 PM, Rafael J. Wysocki<> wrote:
> On Tuesday 02 June 2009, Magnus Damm wrote:
>> If you guys dislike adding arch specific data to struct platform
>> device then for SuperH we can just (mis)use the arch specific data in
>> struct device instead. I'm afraid that solution wastes memory since
>> the data will only be used for platform devices anyway. So I prefer
>> adding arch specific data to struct platform_device instead of struct
>> device if possible.
> BTW, what is the difference really?  You can always put
> dev.platform_data = NULL for devices that don't have any platform data,
> can't you?

So the convention is that dev.platform_data points to driver-specific
data. It may or may not be required by the driver. The format of this
data is driver specific and should be the same across architectures.

What I'm trying to add with struct pdev_archdata is a place for
architecture specific data. This data is needed by architecture
specific code (for example runtime PM), and since it's architecture
specific it should _never_ be touched by device driver code. Exactly
like struct dev_archdata but for platform devices.

Like I said, we _could_ use struct device for this purpose, but it
sounds like suboptimal software design to me. Using struct device
means that we put data where it doesn't belong. I'd like to add
_platform_ _device_ _specific_ data, not data that should be present
in all struct devices in the system but only used in some cases.


/ magnus
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists