|
@@ -436,7 +436,8 @@ static int gpio_twl4030_debounce(u32 debounce, u8 mmc_cd)
|
|
|
|
|
|
static int gpio_twl4030_remove(struct platform_device *pdev);
|
|
|
|
|
|
-static struct twl4030_gpio_platform_data *of_gpio_twl4030(struct device *dev)
|
|
|
+static struct twl4030_gpio_platform_data *of_gpio_twl4030(struct device *dev,
|
|
|
+ struct twl4030_gpio_platform_data *pdata)
|
|
|
{
|
|
|
struct twl4030_gpio_platform_data *omap_twl_info;
|
|
|
|
|
@@ -444,6 +445,9 @@ static struct twl4030_gpio_platform_data *of_gpio_twl4030(struct device *dev)
|
|
|
if (!omap_twl_info)
|
|
|
return NULL;
|
|
|
|
|
|
+ if (pdata)
|
|
|
+ *omap_twl_info = *pdata;
|
|
|
+
|
|
|
omap_twl_info->use_leds = of_property_read_bool(dev->of_node,
|
|
|
"ti,use-leds");
|
|
|
|
|
@@ -501,7 +505,7 @@ no_irqs:
|
|
|
mutex_init(&priv->mutex);
|
|
|
|
|
|
if (node)
|
|
|
- pdata = of_gpio_twl4030(&pdev->dev);
|
|
|
+ pdata = of_gpio_twl4030(&pdev->dev, pdata);
|
|
|
|
|
|
if (pdata == NULL) {
|
|
|
dev_err(&pdev->dev, "Platform data is missing\n");
|