]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mfd/twl-core.c
Merge tag 'topic/twl' into regulator-next
[karo-tx-linux.git] / drivers / mfd / twl-core.c
index d3cf5e8c1d020998cb19841f888cccbc707536a1..6cb10610a1612532f539da00dae5db14aed96cb9 100644 (file)
@@ -263,7 +263,9 @@ struct twl_client {
 
 static struct twl_client twl_modules[TWL_NUM_SLAVES];
 
+#ifdef CONFIG_IRQ_DOMAIN
 static struct irq_domain domain;
+#endif
 
 /* mapping the module id to slave id and base address */
 struct twl_mapping {
@@ -765,9 +767,9 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
 
                /* we need to connect regulators to this transceiver */
                if (twl_has_regulator() && child) {
-                       usb1v5.dev = child;
-                       usb1v8.dev = child;
-                       usb3v1.dev = child;
+                       usb1v5.dev_name = dev_name(child);
+                       usb1v8.dev_name = dev_name(child);
+                       usb3v1.dev_name = dev_name(child);
                }
        }
        if (twl_has_usb() && pdata->usb && twl_class_is_6030()) {
@@ -813,7 +815,7 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
                        return PTR_ERR(child);
                /* we need to connect regulators to this transceiver */
                if (twl_has_regulator() && child)
-                       usb3v3.dev = child;
+                       usb3v3.dev_name = dev_name(child);
        } else if (twl_has_regulator() && twl_class_is_6030()) {
                if (features & TWL6025_SUBCLASS)
                        child = add_regulator(TWL6025_REG_LDOUSB,
@@ -1265,13 +1267,13 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
        pdata->irq_base = status;
        pdata->irq_end = pdata->irq_base + nr_irqs;
 
+#ifdef CONFIG_IRQ_DOMAIN
        domain.irq_base = pdata->irq_base;
        domain.nr_irq = nr_irqs;
-#ifdef CONFIG_OF_IRQ
        domain.of_node = of_node_get(node);
        domain.ops = &irq_domain_simple_ops;
-#endif
        irq_domain_add(&domain);
+#endif
 
        if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) {
                dev_dbg(&client->dev, "can't talk I2C?\n");