ath9k: introduce platform driver for AHB bus support

This patch adds the platform_driver itself, and modifies the main driver
to register it.

Changes-licensed-under: ISC

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 6257790..7f4d1bb 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -2527,8 +2527,17 @@
 		goto err_rate_unregister;
 	}
 
+	error = ath_ahb_init();
+	if (error < 0) {
+		error = -ENODEV;
+		goto err_pci_exit;
+	}
+
 	return 0;
 
+ err_pci_exit:
+	ath_pci_exit();
+
  err_rate_unregister:
 	ath_rate_control_unregister();
  err_out:
@@ -2538,6 +2547,7 @@
 
 static void __exit ath9k_exit(void)
 {
+	ath_ahb_exit();
 	ath_pci_exit();
 	ath_rate_control_unregister();
 	printk(KERN_INFO "%s: Driver unloaded\n", dev_info);