Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch i2c/client_device_id_helper-immutable of wsa/linux into next

Merge Wolfram's topic branch holding the new i2c_client_get_device_id()
helper, so that we can apply conversion patches that depend on it.

+15
+14
drivers/i2c/i2c-core-base.c
··· 2236 2236 } 2237 2237 EXPORT_SYMBOL_GPL(i2c_get_device_id); 2238 2238 2239 + /** 2240 + * i2c_client_get_device_id - get the driver match table entry of a device 2241 + * @client: the device to query. The device must be bound to a driver 2242 + * 2243 + * Returns a pointer to the matching entry if found, NULL otherwise. 2244 + */ 2245 + const struct i2c_device_id *i2c_client_get_device_id(const struct i2c_client *client) 2246 + { 2247 + const struct i2c_driver *drv = to_i2c_driver(client->dev.driver); 2248 + 2249 + return i2c_match_id(drv->id_table, client); 2250 + } 2251 + EXPORT_SYMBOL_GPL(i2c_client_get_device_id); 2252 + 2239 2253 /* ---------------------------------------------------- 2240 2254 * the i2c address scanning function 2241 2255 * Will not work for 10-bit addresses!
+1
include/linux/i2c.h
··· 189 189 u8 *values); 190 190 int i2c_get_device_id(const struct i2c_client *client, 191 191 struct i2c_device_identity *id); 192 + const struct i2c_device_id *i2c_client_get_device_id(const struct i2c_client *client); 192 193 #endif /* I2C */ 193 194 194 195 /**