.attach_adapter = lm78_attach_adapter,
.detach_client = lm78_detach_client,
};
static struct i2c_driver lm78_isa_driver = {
.attach_adapter = lm78_attach_adapter,
.detach_client = lm78_detach_client,
};
static struct i2c_driver lm78_isa_driver = {
.attach_adapter = lm78_isa_attach_adapter,
.detach_client = lm78_detach_client,
};
.attach_adapter = lm78_isa_attach_adapter,
.detach_client = lm78_detach_client,
};
static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
{
struct lm78_data *data = lm78_update_device(dev);
static ssize_t show_vid(struct device *dev, struct device_attribute *attr, char *buf)
{
struct lm78_data *data = lm78_update_device(dev);
- return sprintf(buf, "%d\n", vid_from_reg(82, data->vid));
+ return sprintf(buf, "%d\n", vid_from_reg(data->vid, 82));
}
static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
}
static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
/* Reserve the ISA region */
if (is_isa)
if (!request_region(address, LM78_EXTENT,
/* Reserve the ISA region */
if (is_isa)
if (!request_region(address, LM78_EXTENT,
client structure, even though we cannot fill it completely yet.
But it allows us to access lm78_{read,write}_value. */
client structure, even though we cannot fill it completely yet.
But it allows us to access lm78_{read,write}_value. */
static void lm78_init_client(struct i2c_client *client)
{
u8 config = lm78_read_value(client, LM78_REG_CONFIG);
static void lm78_init_client(struct i2c_client *client)
{
u8 config = lm78_read_value(client, LM78_REG_CONFIG);