Revert "i2c: Add i2c_get_match_data()"
This reverts commit 514a1508c3
which is
commit 564d73c4d9201526bd976b9379d2aaf1a7133e84 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I127ac41f68d2ba04f0955272f8b38d9fb67b12c2
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
a99e4337ab
commit
47d930c2c7
@ -92,25 +92,6 @@ const struct i2c_device_id *i2c_match_id(const struct i2c_device_id *id,
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(i2c_match_id);
|
EXPORT_SYMBOL_GPL(i2c_match_id);
|
||||||
|
|
||||||
const void *i2c_get_match_data(const struct i2c_client *client)
|
|
||||||
{
|
|
||||||
struct i2c_driver *driver = to_i2c_driver(client->dev.driver);
|
|
||||||
const struct i2c_device_id *match;
|
|
||||||
const void *data;
|
|
||||||
|
|
||||||
data = device_get_match_data(&client->dev);
|
|
||||||
if (!data) {
|
|
||||||
match = i2c_match_id(driver->id_table, client);
|
|
||||||
if (!match)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
data = (const void *)match->driver_data;
|
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(i2c_get_match_data);
|
|
||||||
|
|
||||||
static int i2c_device_match(struct device *dev, struct device_driver *drv)
|
static int i2c_device_match(struct device *dev, struct device_driver *drv)
|
||||||
{
|
{
|
||||||
struct i2c_client *client = i2c_verify_client(dev);
|
struct i2c_client *client = i2c_verify_client(dev);
|
||||||
|
@ -342,8 +342,6 @@ struct i2c_adapter *i2c_verify_adapter(struct device *dev);
|
|||||||
const struct i2c_device_id *i2c_match_id(const struct i2c_device_id *id,
|
const struct i2c_device_id *i2c_match_id(const struct i2c_device_id *id,
|
||||||
const struct i2c_client *client);
|
const struct i2c_client *client);
|
||||||
|
|
||||||
const void *i2c_get_match_data(const struct i2c_client *client);
|
|
||||||
|
|
||||||
static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
|
static inline struct i2c_client *kobj_to_i2c_client(struct kobject *kobj)
|
||||||
{
|
{
|
||||||
struct device * const dev = kobj_to_dev(kobj);
|
struct device * const dev = kobj_to_dev(kobj);
|
||||||
|
Loading…
Reference in New Issue
Block a user