Thread (1 message) 1 message, 1 author, 2014-09-20

[PATCH v3 1/2] bcma: register bcma as device tree driver

From: Varka Bhadram <hidden>
Date: 2014-09-20 15:53:46
Also in: linux-devicetree, linux-wireless

On Saturday 20 September 2014 09:13 PM, Hauke Mehrtens wrote:
On 09/20/2014 05:40 PM, Varka Bhadram wrote:
quoted
On Saturday 20 September 2014 06:32 PM, Hauke Mehrtens wrote:
quoted
This driver is used by the bcm53xx ARM SoC code. Now it is possible to
give the address of the chipcommon core in device tree and bcma will
search for all the other cores.
(...)
quoted
+
+static const struct of_device_id bcma_host_soc_of_match[] = {
+    { .compatible = "brcm,bus-axi", },
+    {},
+};
+MODULE_DEVICE_TABLE(of, bcma_host_soc_of_match);
+
+static struct platform_driver bcma_host_soc_driver = {
+    .driver = {
+        .name = "bcma-host-soc",
+        .owner = THIS_MODULE,
This field updated automatically...
Ok, I will remove this line.
quoted
quoted
+        .of_match_table = bcma_host_soc_of_match,
+    },
+    .probe        = bcma_host_soc_probe,
+    .remove        = bcma_host_soc_remove,
+};
+
+int __init bcma_host_soc_register_driver(void)
+{
+    return platform_driver_register(&bcma_host_soc_driver);
+}
+
+void __exit bcma_host_soc_unregister_driver(void)
+{
+    platform_driver_unregister(&bcma_host_soc_driver);
+}
+#endif /* CONFIG_OF */
Why dont you use module_platform_driver(...)...?
module_platform_driver() does not work, because we can only have one
module_init() method in a module and main.c already has one. This driver
can also be registered as an PCI device.
Ok.. thanks


-- 
-Varka Bhadram
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help