}
	}
	return -ENODEV;
}

static struct i2c_device_id nxt_i2c_sensor_id_table[] = {
	NXT_I2C_SENSOR_ID_TABLE_DATA
};
MODULE_DEVICE_TABLE(i2c, nxt_i2c_sensor_id_table);

struct i2c_driver nxt_i2c_sensor_driver = {
	.driver = {
		.name	= "nxt-i2c-sensor",
	},
	.id_table	= nxt_i2c_sensor_id_table,
	.probe		= nxt_i2c_sensor_probe,
	.remove		= nxt_i2c_sensor_remove,
	.class		= I2C_CLASS_LEGOEV3,
	.detect		= nxt_i2c_sensor_detect,
	.address_list	= I2C_ADDRS(0x01, 0x02, 0x03, 0x08, 0x0a, 0x0c, 0x11, 0x18,
				    0x4c, 0x50, 0x51, 0x52, 0x58),
};
module_i2c_driver(nxt_i2c_sensor_driver);
EXPORT_SYMBOL_GPL(nxt_i2c_sensor_driver);

MODULE_DESCRIPTION("LEGO MINDSTORMS NXT I2C sensor device driver");
MODULE_AUTHOR("David Lechner <*****@*****.**>");
MODULE_LICENSE("GPL");
MODULE_ALIAS("lego:nxt-i2c-sensor");
MODULE_ALIAS("lego:nxt-i2c-host");
Example #2
0
}

static int adt7410_i2c_remove(struct i2c_client *client)
{
	return adt7x10_remove(&client->dev, client->irq);
}

static const struct i2c_device_id adt7410_ids[] = {
	{ "adt7410", 0 },
	{ "adt7420", 0 },
	{}
};
MODULE_DEVICE_TABLE(i2c, adt7410_ids);

static struct i2c_driver adt7410_driver = {
	.class		= I2C_CLASS_HWMON,
	.driver = {
		.name	= "adt7410",
		.pm	= ADT7X10_DEV_PM_OPS,
	},
	.probe		= adt7410_i2c_probe,
	.remove		= adt7410_i2c_remove,
	.id_table	= adt7410_ids,
	.address_list	= I2C_ADDRS(0x48, 0x49, 0x4a, 0x4b),
};
module_i2c_driver(adt7410_driver);

MODULE_AUTHOR("Lars-Peter Clausen <*****@*****.**>");
MODULE_DESCRIPTION("ADT7410/AD7420 driver");
MODULE_LICENSE("GPL");