Changeset 1510

Show
Ignore:
Timestamp:
08/28/02 23:53:53 (11 years ago)
Author:
amalysh
Message:

added force option, can be useful for testing i2c-sis630 on other SIS chips

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/busses/i2c-sis630.c

    r1508 r1510  
    9292#define SIS630_BLOCK_DATA 0x05 
    9393 
     94/* insmod parameters */ 
     95 
     96/* If force is set to anything different from 0, we forcibly enable the 
     97   SIS630. DANGEROUS! */ 
     98static int force = 0; 
     99MODULE_PARM(force, "i"); 
     100MODULE_PARM_DESC(force, "Forcibly enable the SIS630. DANGEROUS!") 
     101 
    94102 
    95103#ifdef MODULE 
     
    317325int sis630_setup(void) { 
    318326        unsigned char b; 
    319         struct pci_dev *sis630_dev = NULL; 
     327        struct pci_dev *sis630_dev = NULL,*tmp = NULL; 
    320328 
    321329        /* First check whether we can access PCI at all */ 
     
    332340                return -ENODEV; 
    333341        } 
    334         if (NULL == pci_find_device(PCI_VENDOR_ID_SI,PCI_DEVICE_ID_SI_630,NULL)) { 
     342        tmp = pci_find_device(PCI_VENDOR_ID_SI,PCI_DEVICE_ID_SI_630,NULL); 
     343        if (tmp == NULL && force == 0) { 
    335344                printk(KERN_ERR "i2c-sis630.o: Error: Can't detect SIS630!\n"); 
    336345                return -ENODEV; 
     346        } 
     347        else if (tmp == NULL && force > 0) { 
     348                printk(KERN_NOTICE "i2c-sis630.o: WARNING: Can't detect SIS630 , but " 
     349                        "loading because of force option enabled\n"); 
    337350        } 
    338351