mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
wifi: initialize 'struct device' member properly
Normally this is done in 'platform_device_add()' but let's do it in our 'platform_device_register_simple()' implementation.
This commit is contained in:
parent
96351801c9
commit
bc6f523c8d
@ -169,6 +169,11 @@ int platform_device_add_resources(struct platform_device *pdev,
|
||||
}
|
||||
|
||||
|
||||
struct bus_type platform_bus_type = {
|
||||
.name = "platform"
|
||||
};
|
||||
|
||||
|
||||
struct platform_device *platform_device_register_simple(const char *name, int id,
|
||||
const struct resource *res,
|
||||
unsigned int num)
|
||||
@ -177,6 +182,8 @@ struct platform_device *platform_device_register_simple(const char *name, int id
|
||||
if (!pdev)
|
||||
return 0;
|
||||
|
||||
pdev->dev.bus = &platform_bus_type;
|
||||
|
||||
size_t len = strlen(name);
|
||||
pdev->name = kzalloc(len + 1, GFP_KERNEL);
|
||||
if (!pdev->name)
|
||||
|
Loading…
Reference in New Issue
Block a user