You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
core: platform: let platform_create_bundle initialize module owner
Since commit 9447057eaf ("platform_device: use a macro instead of
platform_driver_register"), platform_driver_register() always overwrites
the .owner field of a platform_driver with THIS_MODULE. This breaks
platform_create_bundle() which uses it via platform_driver_probe() from
within the platform core instead of the module init. Fix it by using a
similar #define construct to obtain THIS_MODULE and pass it on later.
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c3b50dc219
commit
291f653a14
@@ -240,10 +240,12 @@ static void __exit __platform_driver##_exit(void) \
|
||||
} \
|
||||
module_exit(__platform_driver##_exit);
|
||||
|
||||
extern struct platform_device *platform_create_bundle(
|
||||
#define platform_create_bundle(driver, probe, res, n_res, data, size) \
|
||||
__platform_create_bundle(driver, probe, res, n_res, data, size, THIS_MODULE)
|
||||
extern struct platform_device *__platform_create_bundle(
|
||||
struct platform_driver *driver, int (*probe)(struct platform_device *),
|
||||
struct resource *res, unsigned int n_res,
|
||||
const void *data, size_t size);
|
||||
const void *data, size_t size, struct module *module);
|
||||
|
||||
/* early platform driver interface */
|
||||
struct early_platform_driver {
|
||||
|
||||
Reference in New Issue
Block a user