Thread (22 messages) 22 messages, 7 authors, 2010-10-11
STALE5713d

[PATCH 1/6] mmc: sdhci-pltfm: Add structure for host-specific data

From: Anton Vorontsov <hidden>
Date: 2010-09-30 11:09:22
Also in: linux-mmc

On Thu, Sep 30, 2010 at 12:19:38PM +0200, Wolfram Sang wrote:
[...]
quoted
You're right it wouldn't. But isn't it a bit risky even if you could access it,
in the long the platform_data coild point to something that is in the __devinit section
or similar?
The use-case we see now is in the custom init() call, i.e. setting up
GPIO, enabling clocks. That is in the same section. Accessing
platform_data later is in deed always risky and should not be done,
sdhci-pltfm is no special case here.
I don't think that it's always risky, it's more driver-specific.

Many drivers access it from everywhere, see drivers/mmc/host/mmc_spi.c
for example. In general, if the driver needs most of the platform data
in the run-time, it makes no sense to duplicate or copy the pdata into
the private struct field by field.

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru at gmail.com
irc://irc.freenode.net/bd2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help