Merge tag 'for-5.4-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[linux-2.6-block.git] / drivers / i2c / i2c-core-base.c
index 72b300174cb8b2b7636900f2b3148f0390d8c106..5f6a4985f2bc8f3398bd0dd353e79c213ea50ae9 100644 (file)
@@ -350,13 +350,11 @@ static int i2c_device_probe(struct device *dev)
                return -ENODEV;
 
        if (client->flags & I2C_CLIENT_WAKE) {
-               int wakeirq = -ENOENT;
+               int wakeirq;
 
-               if (dev->of_node) {
-                       wakeirq = of_irq_get_byname(dev->of_node, "wakeup");
-                       if (wakeirq == -EPROBE_DEFER)
-                               return wakeirq;
-               }
+               wakeirq = of_irq_get_byname(dev->of_node, "wakeup");
+               if (wakeirq == -EPROBE_DEFER)
+                       return wakeirq;
 
                device_init_wakeup(&client->dev, true);
 
@@ -966,7 +964,7 @@ struct i2c_client *devm_i2c_new_dummy_device(struct device *dev,
 EXPORT_SYMBOL_GPL(devm_i2c_new_dummy_device);
 
 /**
- * i2c_new_secondary_device - Helper to get the instantiated secondary address
+ * i2c_new_ancillary_device - Helper to get the instantiated secondary address
  * and create the associated device
  * @client: Handle to the primary client
  * @name: Handle to specify which secondary address to get
@@ -985,9 +983,9 @@ EXPORT_SYMBOL_GPL(devm_i2c_new_dummy_device);
  * cell whose "reg-names" value matches the slave name.
  *
  * This returns the new i2c client, which should be saved for later use with
- * i2c_unregister_device(); or NULL to indicate an error.
+ * i2c_unregister_device(); or an ERR_PTR to describe the error.
  */
-struct i2c_client *i2c_new_secondary_device(struct i2c_client *client,
+struct i2c_client *i2c_new_ancillary_device(struct i2c_client *client,
                                                const char *name,
                                                u16 default_addr)
 {
@@ -1002,9 +1000,9 @@ struct i2c_client *i2c_new_secondary_device(struct i2c_client *client,
        }
 
        dev_dbg(&client->adapter->dev, "Address for %s : 0x%x\n", name, addr);
-       return i2c_new_dummy(client->adapter, addr);
+       return i2c_new_dummy_device(client->adapter, addr);
 }
-EXPORT_SYMBOL_GPL(i2c_new_secondary_device);
+EXPORT_SYMBOL_GPL(i2c_new_ancillary_device);
 
 /* ------------------------------------------------------------------------- */