2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 14:25:39 +00:00

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.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@67 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard
1998-12-11 02:16:59 +00:00
parent bc8bc74784
commit ea315df1c3
6 changed files with 24 additions and 6 deletions

View File

@@ -75,28 +75,34 @@ static int isa_initialized;
int isa_master_xfer (struct isa_adapter *adap, struct i2c_msg msgs[],
int num)
{
#ifdef DEBUG
printk("isa.o: isa_master_xfer called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Algorithm slave_send call-back implementation. Can't do that... */
int isa_slave_send (struct isa_adapter *adap, char *data, int len)
{
#ifdef DEBUG
printk("isa.o: isa_slave_send called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Algorithm slave_recv call-back implementation. Can't do that... */
int isa_slave_recv (struct isa_adapter *adap, char *data, int len)
{
#ifdef DEBUG
printk("isa.o: isa_slave_recv called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Here we can put additional calls to modify the workings of the algorithm.

View File

@@ -84,9 +84,6 @@ static struct proc_dir_entry proc_bus_i2c_dir =
/* size */ 0,
/* ops */ NULL,
/* get_info */ &read_bus_i2c
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58))
/* fill_inode */ &monitor_bus_i2c
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */
};
/* List of registered entries in /proc/bus */

View File

@@ -187,28 +187,34 @@ s32 smbus_access_i2c(struct i2c_adapter * adapter, u8 addr, char read_write,
int smbus_master_xfer (struct smbus_adapter *adap, struct i2c_msg msgs[],
int num)
{
#ifdef DEBUG
printk("smbus.o: smbus_master_xfer called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Algorithm slave_send call-back implementation. Can't do that... */
int smbus_slave_send (struct smbus_adapter *adap, char *data, int len)
{
#ifdef DEBUG
printk("smbus.o: smbus_slave_send called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Algorithm slave_recv call-back implementation. Can't do that... */
int smbus_slave_recv (struct smbus_adapter *adap, char *data, int len)
{
#ifdef DEBUG
printk("smbus.o: smbus_slave_recv called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Here we can put additional calls to modify the workings of the algorithm.

View File

@@ -84,9 +84,6 @@ static struct proc_dir_entry proc_bus_i2c_dir =
/* size */ 0,
/* ops */ NULL,
/* get_info */ &read_bus_i2c
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58))
/* fill_inode */ &monitor_bus_i2c
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */
};
/* List of registered entries in /proc/bus */

View File

@@ -75,28 +75,34 @@ static int isa_initialized;
int isa_master_xfer (struct isa_adapter *adap, struct i2c_msg msgs[],
int num)
{
#ifdef DEBUG
printk("isa.o: isa_master_xfer called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Algorithm slave_send call-back implementation. Can't do that... */
int isa_slave_send (struct isa_adapter *adap, char *data, int len)
{
#ifdef DEBUG
printk("isa.o: isa_slave_send called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Algorithm slave_recv call-back implementation. Can't do that... */
int isa_slave_recv (struct isa_adapter *adap, char *data, int len)
{
#ifdef DEBUG
printk("isa.o: isa_slave_recv called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Here we can put additional calls to modify the workings of the algorithm.

View File

@@ -187,28 +187,34 @@ s32 smbus_access_i2c(struct i2c_adapter * adapter, u8 addr, char read_write,
int smbus_master_xfer (struct smbus_adapter *adap, struct i2c_msg msgs[],
int num)
{
#ifdef DEBUG
printk("smbus.o: smbus_master_xfer called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Algorithm slave_send call-back implementation. Can't do that... */
int smbus_slave_send (struct smbus_adapter *adap, char *data, int len)
{
#ifdef DEBUG
printk("smbus.o: smbus_slave_send called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Algorithm slave_recv call-back implementation. Can't do that... */
int smbus_slave_recv (struct smbus_adapter *adap, char *data, int len)
{
#ifdef DEBUG
printk("smbus.o: smbus_slave_recv called for adapter `%s' "
"(no i2c level access possible!)\n",
adap->name);
return -1;
#endif
}
/* Here we can put additional calls to modify the workings of the algorithm.