diff options
Diffstat (limited to 'drivers/misc/hpilo.c')
-rw-r--r-- | drivers/misc/hpilo.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c index 12ccdf94e4fa..621c7a373390 100644 --- a/drivers/misc/hpilo.c +++ b/drivers/misc/hpilo.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | static struct class *ilo_class; | 31 | static struct class *ilo_class; |
32 | static unsigned int ilo_major; | 32 | static unsigned int ilo_major; |
33 | static unsigned int max_ccb = MIN_CCB; | 33 | static unsigned int max_ccb = 16; |
34 | static char ilo_hwdev[MAX_ILO_DEV]; | 34 | static char ilo_hwdev[MAX_ILO_DEV]; |
35 | 35 | ||
36 | static inline int get_entry_id(int entry) | 36 | static inline int get_entry_id(int entry) |
@@ -686,7 +686,7 @@ static void ilo_unmap_device(struct pci_dev *pdev, struct ilo_hwinfo *hw) | |||
686 | pci_iounmap(pdev, hw->mmio_vaddr); | 686 | pci_iounmap(pdev, hw->mmio_vaddr); |
687 | } | 687 | } |
688 | 688 | ||
689 | static int __devinit ilo_map_device(struct pci_dev *pdev, struct ilo_hwinfo *hw) | 689 | static int ilo_map_device(struct pci_dev *pdev, struct ilo_hwinfo *hw) |
690 | { | 690 | { |
691 | int error = -ENOMEM; | 691 | int error = -ENOMEM; |
692 | 692 | ||
@@ -725,6 +725,9 @@ static void ilo_remove(struct pci_dev *pdev) | |||
725 | int i, minor; | 725 | int i, minor; |
726 | struct ilo_hwinfo *ilo_hw = pci_get_drvdata(pdev); | 726 | struct ilo_hwinfo *ilo_hw = pci_get_drvdata(pdev); |
727 | 727 | ||
728 | if (!ilo_hw) | ||
729 | return; | ||
730 | |||
728 | clear_device(ilo_hw); | 731 | clear_device(ilo_hw); |
729 | 732 | ||
730 | minor = MINOR(ilo_hw->cdev.dev); | 733 | minor = MINOR(ilo_hw->cdev.dev); |
@@ -748,12 +751,16 @@ static void ilo_remove(struct pci_dev *pdev) | |||
748 | ilo_hwdev[(minor / max_ccb)] = 0; | 751 | ilo_hwdev[(minor / max_ccb)] = 0; |
749 | } | 752 | } |
750 | 753 | ||
751 | static int __devinit ilo_probe(struct pci_dev *pdev, | 754 | static int ilo_probe(struct pci_dev *pdev, |
752 | const struct pci_device_id *ent) | 755 | const struct pci_device_id *ent) |
753 | { | 756 | { |
754 | int devnum, minor, start, error; | 757 | int devnum, minor, start, error = 0; |
755 | struct ilo_hwinfo *ilo_hw; | 758 | struct ilo_hwinfo *ilo_hw; |
756 | 759 | ||
760 | /* Ignore subsystem_device = 0x1979 (set by BIOS) */ | ||
761 | if (pdev->subsystem_device == 0x1979) | ||
762 | goto out; | ||
763 | |||
757 | if (max_ccb > MAX_CCB) | 764 | if (max_ccb > MAX_CCB) |
758 | max_ccb = MAX_CCB; | 765 | max_ccb = MAX_CCB; |
759 | else if (max_ccb < MIN_CCB) | 766 | else if (max_ccb < MIN_CCB) |
@@ -852,7 +859,7 @@ static struct pci_driver ilo_driver = { | |||
852 | .name = ILO_NAME, | 859 | .name = ILO_NAME, |
853 | .id_table = ilo_devices, | 860 | .id_table = ilo_devices, |
854 | .probe = ilo_probe, | 861 | .probe = ilo_probe, |
855 | .remove = __devexit_p(ilo_remove), | 862 | .remove = ilo_remove, |
856 | }; | 863 | }; |
857 | 864 | ||
858 | static int __init ilo_init(void) | 865 | static int __init ilo_init(void) |
@@ -892,14 +899,14 @@ static void __exit ilo_exit(void) | |||
892 | class_destroy(ilo_class); | 899 | class_destroy(ilo_class); |
893 | } | 900 | } |
894 | 901 | ||
895 | MODULE_VERSION("1.3"); | 902 | MODULE_VERSION("1.4"); |
896 | MODULE_ALIAS(ILO_NAME); | 903 | MODULE_ALIAS(ILO_NAME); |
897 | MODULE_DESCRIPTION(ILO_NAME); | 904 | MODULE_DESCRIPTION(ILO_NAME); |
898 | MODULE_AUTHOR("David Altobelli <david.altobelli@hp.com>"); | 905 | MODULE_AUTHOR("David Altobelli <david.altobelli@hp.com>"); |
899 | MODULE_LICENSE("GPL v2"); | 906 | MODULE_LICENSE("GPL v2"); |
900 | 907 | ||
901 | module_param(max_ccb, uint, 0444); | 908 | module_param(max_ccb, uint, 0444); |
902 | MODULE_PARM_DESC(max_ccb, "Maximum number of HP iLO channels to attach (8)"); | 909 | MODULE_PARM_DESC(max_ccb, "Maximum number of HP iLO channels to attach (16)"); |
903 | 910 | ||
904 | module_init(ilo_init); | 911 | module_init(ilo_init); |
905 | module_exit(ilo_exit); | 912 | module_exit(ilo_exit); |