Changeset 67

Show
Ignore:
Timestamp:
12/11/98 03:16:59 (14 years ago)
Author:
frodo
Message:

Made the ISA/SMBus code shut up if DEBUG is off and things try to
access unimplementable functionality. And removed a #if which could never
become true anyway from i2c-proc.c.

Location:
lm-sensors/trunk
Files:
6 modified

Legend:

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

    r44 r67  
    7676                     int num) 
    7777{ 
     78#ifdef DEBUG 
    7879  printk("isa.o: isa_master_xfer called for adapter `%s' " 
    7980         "(no i2c level access possible!)\n", 
    8081         adap->name); 
    8182  return -1; 
     83#endif 
    8284} 
    8385 
     
    8587int isa_slave_send (struct isa_adapter *adap, char *data, int len) 
    8688{ 
     89#ifdef DEBUG 
    8790  printk("isa.o: isa_slave_send called for adapter `%s' " 
    8891         "(no i2c level access possible!)\n", 
    8992         adap->name); 
    9093  return -1; 
     94#endif 
    9195} 
    9296 
     
    9498int isa_slave_recv (struct isa_adapter *adap, char *data, int len) 
    9599{ 
     100#ifdef DEBUG 
    96101  printk("isa.o: isa_slave_recv called for adapter `%s' " 
    97102         "(no i2c level access possible!)\n", 
    98103         adap->name); 
    99104  return -1; 
     105#endif 
    100106} 
    101107 
  • lm-sensors/trunk/kernel/i2c-proc.c

    r55 r67  
    8585    /* ops */           NULL, 
    8686    /* get_info */      &read_bus_i2c 
    87 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 
    88     /* fill_inode */    &monitor_bus_i2c 
    89 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */ 
    9087  }; 
    9188 
  • lm-sensors/trunk/kernel/smbus.c

    r54 r67  
    188188                       int num) 
    189189{ 
     190#ifdef DEBUG 
    190191  printk("smbus.o: smbus_master_xfer called for adapter `%s' " 
    191192         "(no i2c level access possible!)\n", 
    192193         adap->name); 
    193194  return -1; 
     195#endif 
    194196} 
    195197 
     
    197199int smbus_slave_send (struct smbus_adapter *adap, char *data, int len) 
    198200{ 
     201#ifdef DEBUG 
    199202  printk("smbus.o: smbus_slave_send called for adapter `%s' " 
    200203         "(no i2c level access possible!)\n", 
    201204         adap->name); 
    202205  return -1; 
     206#endif 
    203207} 
    204208 
     
    206210int smbus_slave_recv (struct smbus_adapter *adap, char *data, int len) 
    207211{ 
     212#ifdef DEBUG 
    208213  printk("smbus.o: smbus_slave_recv called for adapter `%s' " 
    209214         "(no i2c level access possible!)\n", 
    210215         adap->name); 
    211216  return -1; 
     217#endif 
    212218} 
    213219 
  • lm-sensors/trunk/src/i2c-proc.c

    r55 r67  
    8585    /* ops */           NULL, 
    8686    /* get_info */      &read_bus_i2c 
    87 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 
    88     /* fill_inode */    &monitor_bus_i2c 
    89 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */ 
    9087  }; 
    9188 
  • lm-sensors/trunk/src/isa.c

    r44 r67  
    7676                     int num) 
    7777{ 
     78#ifdef DEBUG 
    7879  printk("isa.o: isa_master_xfer called for adapter `%s' " 
    7980         "(no i2c level access possible!)\n", 
    8081         adap->name); 
    8182  return -1; 
     83#endif 
    8284} 
    8385 
     
    8587int isa_slave_send (struct isa_adapter *adap, char *data, int len) 
    8688{ 
     89#ifdef DEBUG 
    8790  printk("isa.o: isa_slave_send called for adapter `%s' " 
    8891         "(no i2c level access possible!)\n", 
    8992         adap->name); 
    9093  return -1; 
     94#endif 
    9195} 
    9296 
     
    9498int isa_slave_recv (struct isa_adapter *adap, char *data, int len) 
    9599{ 
     100#ifdef DEBUG 
    96101  printk("isa.o: isa_slave_recv called for adapter `%s' " 
    97102         "(no i2c level access possible!)\n", 
    98103         adap->name); 
    99104  return -1; 
     105#endif 
    100106} 
    101107 
  • lm-sensors/trunk/src/smbus.c

    r54 r67  
    188188                       int num) 
    189189{ 
     190#ifdef DEBUG 
    190191  printk("smbus.o: smbus_master_xfer called for adapter `%s' " 
    191192         "(no i2c level access possible!)\n", 
    192193         adap->name); 
    193194  return -1; 
     195#endif 
    194196} 
    195197 
     
    197199int smbus_slave_send (struct smbus_adapter *adap, char *data, int len) 
    198200{ 
     201#ifdef DEBUG 
    199202  printk("smbus.o: smbus_slave_send called for adapter `%s' " 
    200203         "(no i2c level access possible!)\n", 
    201204         adap->name); 
    202205  return -1; 
     206#endif 
    203207} 
    204208 
     
    206210int smbus_slave_recv (struct smbus_adapter *adap, char *data, int len) 
    207211{ 
     212#ifdef DEBUG 
    208213  printk("smbus.o: smbus_slave_recv called for adapter `%s' " 
    209214         "(no i2c level access possible!)\n", 
    210215         adap->name); 
    211216  return -1; 
     217#endif 
    212218} 
    213219