|
@@ -124,6 +124,10 @@ static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|
struct i2c_client *client = to_i2c_client(dev);
|
|
struct i2c_client *client = to_i2c_client(dev);
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
|
|
+ rc = of_device_uevent_modalias(dev, env);
|
|
|
|
+ if (rc != -ENODEV)
|
|
|
|
+ return rc;
|
|
|
|
+
|
|
rc = acpi_device_uevent_modalias(dev, env);
|
|
rc = acpi_device_uevent_modalias(dev, env);
|
|
if (rc != -ENODEV)
|
|
if (rc != -ENODEV)
|
|
return rc;
|
|
return rc;
|
|
@@ -439,6 +443,10 @@ show_modalias(struct device *dev, struct device_attribute *attr, char *buf)
|
|
struct i2c_client *client = to_i2c_client(dev);
|
|
struct i2c_client *client = to_i2c_client(dev);
|
|
int len;
|
|
int len;
|
|
|
|
|
|
|
|
+ len = of_device_modalias(dev, buf, PAGE_SIZE);
|
|
|
|
+ if (len != -ENODEV)
|
|
|
|
+ return len;
|
|
|
|
+
|
|
len = acpi_device_modalias(dev, buf, PAGE_SIZE -1);
|
|
len = acpi_device_modalias(dev, buf, PAGE_SIZE -1);
|
|
if (len != -ENODEV)
|
|
if (len != -ENODEV)
|
|
return len;
|
|
return len;
|