Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wl12xx: add platform driver to the core module

Nnow that we have a platform_device on both glue layers, add a
platform_driver to the core driver.

It's currently an empty platform_driver but more functionality will be
added on later patches.

Signed-off-by: Felipe Balbi <balbi@ti.com>
[forward-ported, cleaned-up and rephrased commit message]
[added platform_driver.driver initialization]
Signed-off-by: Luciano Coelho <coelho@ti.com>

authored by

Felipe Balbi and committed by
Luciano Coelho
ce2a217c 0969d679

+39
+39
drivers/net/wireless/wl12xx/main.c
··· 5200 5200 } 5201 5201 EXPORT_SYMBOL_GPL(wl1271_free_hw); 5202 5202 5203 + static int __devinit wl12xx_probe(struct platform_device *pdev) 5204 + { 5205 + return 0; 5206 + } 5207 + 5208 + static int __devexit wl12xx_remove(struct platform_device *pdev) 5209 + { 5210 + return 0; 5211 + } 5212 + 5213 + static const struct platform_device_id wl12xx_id_table[] __devinitconst = { 5214 + { "wl12xx-sdio", 0 }, 5215 + { "wl12xx-spi", 0 }, 5216 + { } /* Terminating Entry */ 5217 + }; 5218 + MODULE_DEVICE_TABLE(platform, wl12xx_id_table); 5219 + 5220 + static struct platform_driver wl12xx_driver = { 5221 + .probe = wl12xx_probe, 5222 + .remove = __devexit_p(wl12xx_remove), 5223 + .id_table = wl12xx_id_table, 5224 + .driver = { 5225 + .name = "wl12xx", 5226 + .owner = THIS_MODULE, 5227 + } 5228 + }; 5229 + 5230 + static int __init wl12xx_init(void) 5231 + { 5232 + return platform_driver_register(&wl12xx_driver); 5233 + } 5234 + module_init(wl12xx_init); 5235 + 5236 + static void __exit wl12xx_exit(void) 5237 + { 5238 + platform_driver_unregister(&wl12xx_driver); 5239 + } 5240 + module_exit(wl12xx_exit); 5241 + 5203 5242 u32 wl12xx_debug_level = DEBUG_NONE; 5204 5243 EXPORT_SYMBOL_GPL(wl12xx_debug_level); 5205 5244 module_param_named(debug_level, wl12xx_debug_level, uint, S_IRUSR | S_IWUSR);