mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[POWERPC] Move of_device allocation into of_device.[ch]
Extract generic of_device allocation code from of_platform_device_create() and move it into of_device.[ch], called of_device_alloc(). Also, there's now of_device_free() which puts the device node. This way, bus drivers that build on of_platform (like ibmebus will) can build upon this code instead of reinventing the wheel. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
ebb3e820b8
commit
fec738dd48
4 changed files with 91 additions and 68 deletions
|
@ -22,5 +22,10 @@ extern int of_device_register(struct of_device *ofdev);
|
|||
extern void of_device_unregister(struct of_device *ofdev);
|
||||
extern void of_release_dev(struct device *dev);
|
||||
|
||||
static inline void of_device_free(struct of_device *dev)
|
||||
{
|
||||
of_release_dev(&dev->dev);
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_OF_DEVICE_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue