On Tuesday 05 November 2013, Jason Gunthorpe wrote: > The issue is sysfs, the TPM core attaches attributes to the driver's > struct device, which means it has to convert from struct device * to > its own private data. It is totally wrong, but that is the way > it has been for ever. :( I've just had a very brief look at that subsystem, and the first driver I looked at (tpm_atmel) actually creates a child platform_device for the sole purpose of registering that with the tpm subsystem, which seems to avoid this problem. Maybe the same can be done for the other drivers as well. Unfortunately, that will change the sysfs structure, which might break user space relying on the current path to the device. The TPM subsystem definely seems a bit unusual in this regard, so I hope not too many other parts of the kernel have this particular problem. (side note: another unusual aspect of the TPM subsystem is the use of a custom 'release' function override. Seems harmless, but very weird). Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html