Merge tag 'backport/v3.14.24-ltsi-rc1/sh-pfc-to-v3.18-rc1' into backport/v3.14.24...
authorSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 01:59:01 +0000 (10:59 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 01:59:01 +0000 (10:59 +0900)
drivers/pinctrl/sh-pfc/core.c
drivers/pinctrl/sh-pfc/core.h
drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
drivers/pinctrl/sh-pfc/pfc-r8a7740.c
drivers/pinctrl/sh-pfc/pfc-sh7372.c
drivers/pinctrl/sh-pfc/pfc-sh73a0.c
drivers/pinctrl/sh-pfc/sh_pfc.h

index b9b464d..6572c23 100644 (file)
@@ -542,7 +542,7 @@ static int sh_pfc_probe(struct platform_device *pdev)
         */
        ret = sh_pfc_register_pinctrl(pfc);
        if (unlikely(ret != 0))
-               goto error;
+               return ret;
 
 #ifdef CONFIG_GPIO_SH_PFC
        /*
@@ -564,11 +564,6 @@ static int sh_pfc_probe(struct platform_device *pdev)
        dev_info(pfc->dev, "%s support registered\n", info->name);
 
        return 0;
-
-error:
-       if (info->ops && info->ops->exit)
-               info->ops->exit(pfc);
-       return ret;
 }
 
 static int sh_pfc_remove(struct platform_device *pdev)
@@ -580,9 +575,6 @@ static int sh_pfc_remove(struct platform_device *pdev)
 #endif
        sh_pfc_unregister_pinctrl(pfc);
 
-       if (pfc->info->ops && pfc->info->ops->exit)
-               pfc->info->ops->exit(pfc);
-
        return 0;
 }
 
index b7b0e6c..3daaa52 100644 (file)
@@ -33,7 +33,6 @@ struct sh_pfc_pin_range {
 struct sh_pfc {
        struct device *dev;
        const struct sh_pfc_soc_info *info;
-       void *soc_data;
        spinlock_t lock;
 
        unsigned int num_windows;
index ce9fb7a..280a56f 100644 (file)
@@ -2717,14 +2717,14 @@ static void r8a73a4_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
        iowrite8(value, addr);
 }
 
-static const struct sh_pfc_soc_operations r8a73a4_pinmux_ops = {
+static const struct sh_pfc_soc_operations r8a73a4_pfc_ops = {
        .get_bias = r8a73a4_pinmux_get_bias,
        .set_bias = r8a73a4_pinmux_set_bias,
 };
 
 const struct sh_pfc_soc_info r8a73a4_pinmux_info = {
        .name           = "r8a73a4_pfc",
-       .ops            = &r8a73a4_pinmux_ops,
+       .ops            = &r8a73a4_pfc_ops,
 
        .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
        .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
index e4c1ef4..b486e9d 100644 (file)
@@ -3752,14 +3752,14 @@ static void r8a7740_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
        iowrite8(value, addr);
 }
 
-static const struct sh_pfc_soc_operations r8a7740_pinmux_ops = {
+static const struct sh_pfc_soc_operations r8a7740_pfc_ops = {
        .get_bias = r8a7740_pinmux_get_bias,
        .set_bias = r8a7740_pinmux_set_bias,
 };
 
 const struct sh_pfc_soc_info r8a7740_pinmux_info = {
        .name           = "r8a7740_pfc",
-       .ops            = &r8a7740_pinmux_ops,
+       .ops            = &r8a7740_pfc_ops,
 
        .input          = { PINMUX_INPUT_BEGIN,
                            PINMUX_INPUT_END },
index d9158b3..8211f66 100644 (file)
@@ -2614,14 +2614,14 @@ static void sh7372_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
        iowrite8(value, addr);
 }
 
-static const struct sh_pfc_soc_operations sh7372_pinmux_ops = {
+static const struct sh_pfc_soc_operations sh7372_pfc_ops = {
        .get_bias = sh7372_pinmux_get_bias,
        .set_bias = sh7372_pinmux_set_bias,
 };
 
 const struct sh_pfc_soc_info sh7372_pinmux_info = {
        .name = "sh7372_pfc",
-       .ops = &sh7372_pinmux_ops,
+       .ops = &sh7372_pfc_ops,
 
        .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
        .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
index 0bd8f44..d2efbfb 100644 (file)
@@ -3824,39 +3824,28 @@ static void sh73a0_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
  * SoC information
  */
 
-struct sh73a0_pinmux_data {
-       struct regulator_dev *vccq_mc0;
-};
-
 static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)
 {
-       struct sh73a0_pinmux_data *data;
        struct regulator_config cfg = { };
+       struct regulator_dev *vccq;
        int ret;
 
-       data = devm_kzalloc(pfc->dev, sizeof(*data), GFP_KERNEL);
-       if (data == NULL)
-               return -ENOMEM;
-
        cfg.dev = pfc->dev;
        cfg.init_data = &sh73a0_vccq_mc0_init_data;
        cfg.driver_data = pfc;
 
-       data->vccq_mc0 = devm_regulator_register(pfc->dev,
-                                                &sh73a0_vccq_mc0_desc, &cfg);
-       if (IS_ERR(data->vccq_mc0)) {
-               ret = PTR_ERR(data->vccq_mc0);
+       vccq = devm_regulator_register(pfc->dev, &sh73a0_vccq_mc0_desc, &cfg);
+       if (IS_ERR(vccq)) {
+               ret = PTR_ERR(vccq);
                dev_err(pfc->dev, "Failed to register VCCQ MC0 regulator: %d\n",
                        ret);
                return ret;
        }
 
-       pfc->soc_data = data;
-
        return 0;
 }
 
-static const struct sh_pfc_soc_operations sh73a0_pinmux_ops = {
+static const struct sh_pfc_soc_operations sh73a0_pfc_ops = {
        .init = sh73a0_pinmux_soc_init,
        .get_bias = sh73a0_pinmux_get_bias,
        .set_bias = sh73a0_pinmux_set_bias,
@@ -3864,7 +3853,7 @@ static const struct sh_pfc_soc_operations sh73a0_pinmux_ops = {
 
 const struct sh_pfc_soc_info sh73a0_pinmux_info = {
        .name = "sh73a0_pfc",
-       .ops = &sh73a0_pinmux_ops,
+       .ops = &sh73a0_pfc_ops,
 
        .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
        .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
index d482c40..5b72831 100644 (file)
@@ -116,7 +116,6 @@ struct sh_pfc;
 
 struct sh_pfc_soc_operations {
        int (*init)(struct sh_pfc *pfc);
-       void (*exit)(struct sh_pfc *pfc);
        unsigned int (*get_bias)(struct sh_pfc *pfc, unsigned int pin);
        void (*set_bias)(struct sh_pfc *pfc, unsigned int pin,
                         unsigned int bias);