Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 457 → Rev 458

/shark/trunk/drivers/i2c/i2c-core.c
21,7 → 21,7
All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl>
SMBus 2.0 support by Mark Studebaker <mdsxyz123@yahoo.com> */
 
/* $Id: i2c-core.c,v 1.2 2004-01-28 18:38:01 giacomo Exp $ */
/* $Id: i2c-core.c,v 1.3 2004-02-23 14:56:41 giacomo Exp $ */
 
/* #define DEBUG 1 */ /* needed to pick up the dev_dbg() calls */
 
84,7 → 84,7
static ssize_t show_adapter_name(struct device *dev, char *buf)
{
struct i2c_adapter *adap = dev_to_i2c_adapter(dev);
return sprintf(buf, "%s\n", adap->name);
return sprintf26(buf, "%s\n", adap->name);
}
static DEVICE_ATTR(name, S_IRUGO, show_adapter_name, NULL);
 
98,7 → 98,7
static ssize_t show_client_name(struct device *dev, char *buf)
{
struct i2c_client *client = to_i2c_client(dev);
return sprintf(buf, "%s\n", client->name);
return sprintf26(buf, "%s\n", client->name);
}
 
/*
142,7 → 142,7
*/
if (adap->dev.parent == NULL)
adap->dev.parent = &legacy_bus;
sprintf(adap->dev.bus_id, "i2c-%d", adap->nr);
sprintf26(adap->dev.bus_id, "i2c-%d", adap->nr);
adap->dev.driver = &i2c_adapter_driver;
adap->dev.release = &i2c_adapter_dev_release;
device_register(&adap->dev);
385,7 → 385,7
client->dev.bus = &i2c_bus_type;
client->dev.release = &i2c_client_release;
snprintf(&client->dev.bus_id[0], sizeof(client->dev.bus_id),
snprintf26(&client->dev.bus_id[0], sizeof(client->dev.bus_id),
"%d-%04x", i2c_adapter_id(adapter), client->addr);
printk("registering %s\n", client->dev.bus_id);
device_register(&client->dev);
/shark/trunk/drivers/i2c/i2c-dev.c
32,6 → 32,8
/* If you want debugging uncomment: */
/* #define DEBUG 1 */
 
#include <linuxcomp.h>
 
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/fs.h>
452,7 → 454,7
else
i2c_dev->class_dev.dev = adap->dev.parent;
i2c_dev->class_dev.class = &i2c_dev_class;
snprintf(i2c_dev->class_dev.class_id, BUS_ID_SIZE, "i2c-%d", i2c_dev->minor);
snprintf26(i2c_dev->class_dev.class_id, BUS_ID_SIZE, "i2c-%d", i2c_dev->minor);
retval = class_device_register(&i2c_dev->class_dev);
if (retval)
goto error;
512,7 → 514,7
.driver = &i2cdev_driver,
};
 
static int __init i2c_dev_init(void)
int __init i2c_dev_init(void)
{
int res;
 
/shark/trunk/drivers/i2c/makefile
10,7 → 10,7
 
OBJS_PATH = $(BASE)/drivers/i2c
 
OBJS = i2c-core.o algos/i2c-algo-bit.o
OBJS = i2c-dev.o i2c-core.o algos/i2c-algo-bit.o
 
OTHERINCL += -I$(BASE)/drivers/linuxc26/include