On Mon, May 30, 2011 at 12:57:57PM +0200, Antonio Ospite wrote: > It is cleaner and more uniform indeed, but it does not solve the problem > I am seeing, the issue is still there when pdata is NULL, we are at the > same point as before (the current code checks for (pdata && > pdata->field)), and we cannot pass pdata directly as a function argument > (can we?) as it is driver specific as well.
You can do a nasty type punning trick if the generic pdata is the first member of the platform data, otherwise the easiest thing is usually to provide a defualt pdata if the pdata is NULL. I'd expect that in a lot of cases the standard platform data would be the only platform data so for many drivers they wouldn't need to worry about extra data but perhaps MMC isn't like that, I've never really looked at the code. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
