Searched hist:"30816 ac0495cb4f33fc8d748f64ac3cc880cb3c1" (Results 1 – 3 of 3) sorted by relevance
/linux/include/linux/mfd/ |
H A D | mcp.h | diff 30816ac0495cb4f33fc8d748f64ac3cc880cb3c1 Fri Jan 20 23:51:07 CET 2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-core: sanitize host creation/removal
host_unregister() gives us no chance between removing the device and the mcp data structure being freed to access the data inbetween, which drivers may need to do if they need to iounmap() pointers in their private data structures.
Therefore, re-jig the interfaces, which are now, on creation:
mcp = mcp_host_alloc() if (mcp) { ret = mcp_host_add(mcp, data);
if (!ret) mcp_host_free(mcp); }
and on removal:
mcp_host_del(mcp); ... access mcp ... mcp_host_free(mcp);
The free does the final put_device() on the struct device as one would expect.
Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
/linux/drivers/mfd/ |
H A D | mcp-core.c | diff 30816ac0495cb4f33fc8d748f64ac3cc880cb3c1 Fri Jan 20 23:51:07 CET 2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-core: sanitize host creation/removal
host_unregister() gives us no chance between removing the device and the mcp data structure being freed to access the data inbetween, which drivers may need to do if they need to iounmap() pointers in their private data structures.
Therefore, re-jig the interfaces, which are now, on creation:
mcp = mcp_host_alloc() if (mcp) { ret = mcp_host_add(mcp, data);
if (!ret) mcp_host_free(mcp); }
and on removal:
mcp_host_del(mcp); ... access mcp ... mcp_host_free(mcp);
The free does the final put_device() on the struct device as one would expect.
Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
H A D | mcp-sa11x0.c | diff 30816ac0495cb4f33fc8d748f64ac3cc880cb3c1 Fri Jan 20 23:51:07 CET 2012 Russell King <rmk+kernel@arm.linux.org.uk> MFD: mcp-core: sanitize host creation/removal
host_unregister() gives us no chance between removing the device and the mcp data structure being freed to access the data inbetween, which drivers may need to do if they need to iounmap() pointers in their private data structures.
Therefore, re-jig the interfaces, which are now, on creation:
mcp = mcp_host_alloc() if (mcp) { ret = mcp_host_add(mcp, data);
if (!ret) mcp_host_free(mcp); }
and on removal:
mcp_host_del(mcp); ... access mcp ... mcp_host_free(mcp);
The free does the final put_device() on the struct device as one would expect.
Acked-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|