aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-04-15 19:01:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 16:00:00 -0400
commitfed9017e03f23098137716bd6010772ac1aa8a80 (patch)
treeac2e76ca65c84dbfeca758930191f86658ed1948 /drivers/net/wireless/iwlwifi/iwl4965-base.c
parent66c73db7c6f7672e40c0bb1d2689f2d0d0922aad (diff)
iwlwifi: move HW device registration
This patch moves the HW device registration from the iwl-4965.c file, which implies a HW specific support, to a more general location. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index c71910df62aa..249af4156c13 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -8020,9 +8020,17 @@ static int iwl4965_pci_resume(struct pci_dev *pdev)
8020 * 8020 *
8021 *****************************************************************************/ 8021 *****************************************************************************/
8022 8022
8023static struct pci_driver iwl4965_driver = { 8023/* Hardware specific file defines the PCI IDs table for that hardware module */
8024static struct pci_device_id iwl_hw_card_ids[] = {
8025 {IWL_PCI_DEVICE(0x4229, PCI_ANY_ID, iwl4965_agn_cfg)},
8026 {IWL_PCI_DEVICE(0x4230, PCI_ANY_ID, iwl4965_agn_cfg)},
8027 {0}
8028};
8029MODULE_DEVICE_TABLE(pci, iwl_hw_card_ids);
8030
8031static struct pci_driver iwl_driver = {
8024 .name = DRV_NAME, 8032 .name = DRV_NAME,
8025 .id_table = iwl4965_hw_card_ids, 8033 .id_table = iwl_hw_card_ids,
8026 .probe = iwl4965_pci_probe, 8034 .probe = iwl4965_pci_probe,
8027 .remove = __devexit_p(iwl4965_pci_remove), 8035 .remove = __devexit_p(iwl4965_pci_remove),
8028#ifdef CONFIG_PM 8036#ifdef CONFIG_PM
@@ -8044,13 +8052,13 @@ static int __init iwl4965_init(void)
8044 return ret; 8052 return ret;
8045 } 8053 }
8046 8054
8047 ret = pci_register_driver(&iwl4965_driver); 8055 ret = pci_register_driver(&iwl_driver);
8048 if (ret) { 8056 if (ret) {
8049 IWL_ERROR("Unable to initialize PCI module\n"); 8057 IWL_ERROR("Unable to initialize PCI module\n");
8050 goto error_register; 8058 goto error_register;
8051 } 8059 }
8052#ifdef CONFIG_IWLWIFI_DEBUG 8060#ifdef CONFIG_IWLWIFI_DEBUG
8053 ret = driver_create_file(&iwl4965_driver.driver, &driver_attr_debug_level); 8061 ret = driver_create_file(&iwl_driver.driver, &driver_attr_debug_level);
8054 if (ret) { 8062 if (ret) {
8055 IWL_ERROR("Unable to create driver sysfs file\n"); 8063 IWL_ERROR("Unable to create driver sysfs file\n");
8056 goto error_debug; 8064 goto error_debug;
@@ -8061,7 +8069,7 @@ static int __init iwl4965_init(void)
8061 8069
8062#ifdef CONFIG_IWLWIFI_DEBUG 8070#ifdef CONFIG_IWLWIFI_DEBUG
8063error_debug: 8071error_debug:
8064 pci_unregister_driver(&iwl4965_driver); 8072 pci_unregister_driver(&iwl_driver);
8065#endif 8073#endif
8066error_register: 8074error_register:
8067 iwl4965_rate_control_unregister(); 8075 iwl4965_rate_control_unregister();
@@ -8071,9 +8079,9 @@ error_register:
8071static void __exit iwl4965_exit(void) 8079static void __exit iwl4965_exit(void)
8072{ 8080{
8073#ifdef CONFIG_IWLWIFI_DEBUG 8081#ifdef CONFIG_IWLWIFI_DEBUG
8074 driver_remove_file(&iwl4965_driver.driver, &driver_attr_debug_level); 8082 driver_remove_file(&iwl_driver.driver, &driver_attr_debug_level);
8075#endif 8083#endif
8076 pci_unregister_driver(&iwl4965_driver); 8084 pci_unregister_driver(&iwl_driver);
8077 iwl4965_rate_control_unregister(); 8085 iwl4965_rate_control_unregister();
8078} 8086}
8079 8087