Ralf Baechle | e971290 | 2007-05-24 12:54:04 +0100 | [diff] [blame] | 1 | #include <linux/init.h> |
2 | #include <linux/platform_device.h> | ||||
3 | |||||
4 | static __init int meth_devinit(void) | ||||
5 | { | ||||
6 | struct platform_device *pd; | ||||
7 | int ret; | ||||
8 | |||||
9 | pd = platform_device_alloc("meth", -1); | ||||
10 | if (!pd) | ||||
11 | return -ENOMEM; | ||||
12 | |||||
13 | ret = platform_device_add(pd); | ||||
14 | if (ret) | ||||
15 | platform_device_put(pd); | ||||
16 | |||||
17 | return ret; | ||||
18 | } | ||||
19 | |||||
20 | device_initcall(meth_devinit); |