Merge tag 'driver-core-3.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Jan 2013 00:17:50 +0000 (16:17 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Jan 2013 00:17:50 +0000 (16:17 -0800)
Pull driver core __dev* removal patches - take 3 - from Greg Kroah-Hartman:
 "Here are the remaining __dev* removal patches against the 3.8-rc2
  tree.  All of these patches were previously sent to the subsystem
  maintainers, most of them were picked up and pushed to you, but there
  were a number that fell through the cracks, and new drivers were added
  during the merge window, so this series cleans up the rest of the
  instances of these markings.

  Third time's the charm...

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
Fixed up trivial conflict with the pinctrl pull in pinctrl-sirf.c.

* tag 'driver-core-3.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (54 commits)
  misc: remove __dev* attributes.
  include: remove __dev* attributes.
  Documentation: remove __dev* attributes.
  Drivers: misc: remove __dev* attributes.
  Drivers: block: remove __dev* attributes.
  Drivers: bcma: remove __dev* attributes.
  Drivers: char: remove __dev* attributes.
  Drivers: clocksource: remove __dev* attributes.
  Drivers: ssb: remove __dev* attributes.
  Drivers: dma: remove __dev* attributes.
  Drivers: gpu: remove __dev* attributes.
  Drivers: infinband: remove __dev* attributes.
  Drivers: memory: remove __dev* attributes.
  Drivers: mmc: remove __dev* attributes.
  Drivers: iommu: remove __dev* attributes.
  Drivers: power: remove __dev* attributes.
  Drivers: message: remove __dev* attributes.
  Drivers: macintosh: remove __dev* attributes.
  Drivers: mfd: remove __dev* attributes.
  pstore: remove __dev* attributes.
  ...

1  2 
drivers/pinctrl/pinctrl-at91.c
drivers/pinctrl/pinctrl-imx53.c
drivers/pinctrl/pinctrl-nomadik.c
drivers/pinctrl/pinctrl-sirf.c

index bff54bfaff43ffa3d6e8d71a85c8f27fce2eb249,5e224974125de0ba6ede55a50f1c3109fba99ea6..471c71f7f8b611fb87e0d2330627801b5124288d
@@@ -265,7 -265,7 +265,7 @@@ static int at91_dt_node_to_map(struct p
        /* create mux map */
        parent = of_get_parent(np);
        if (!parent) {
 -              kfree(new_map);
 +              devm_kfree(pctldev->dev, new_map);
                return -EINVAL;
        }
        new_map[0].type = PIN_MAP_TYPE_MUX_GROUP;
@@@ -792,8 -792,8 +792,8 @@@ static struct pinctrl_desc at91_pinctrl
  
  static const char *gpio_compat = "atmel,at91rm9200-gpio";
  
- static void __devinit at91_pinctrl_child_count(struct at91_pinctrl *info,
-                                             struct device_node *np)
+ static void at91_pinctrl_child_count(struct at91_pinctrl *info,
+                                    struct device_node *np)
  {
        struct device_node *child;
  
        }
  }
  
- static int __devinit at91_pinctrl_mux_mask(struct at91_pinctrl *info,
-                                         struct device_node *np)
+ static int at91_pinctrl_mux_mask(struct at91_pinctrl *info,
+                                struct device_node *np)
  {
        int ret = 0;
        int size;
        return ret;
  }
  
- static int __devinit at91_pinctrl_parse_groups(struct device_node *np,
-                               struct at91_pin_group *grp,
-                               struct at91_pinctrl *info,
-                               u32 index)
+ static int at91_pinctrl_parse_groups(struct device_node *np,
+                                    struct at91_pin_group *grp,
+                                    struct at91_pinctrl *info, u32 index)
  {
        struct at91_pmx_pin *pin;
        int size;
        return 0;
  }
  
- static int __devinit at91_pinctrl_parse_functions(struct device_node *np,
-                       struct at91_pinctrl *info, u32 index)
+ static int at91_pinctrl_parse_functions(struct device_node *np,
+                                       struct at91_pinctrl *info, u32 index)
  {
        struct device_node *child;
        struct at91_pmx_func *func;
        return 0;
  }
  
- static struct of_device_id at91_pinctrl_of_match[] __devinitdata = {
+ static struct of_device_id at91_pinctrl_of_match[] = {
        { .compatible = "atmel,at91sam9x5-pinctrl", .data = &at91sam9x5_ops },
        { .compatible = "atmel,at91rm9200-pinctrl", .data = &at91rm9200_ops },
        { /* sentinel */ }
  };
  
- static int __devinit at91_pinctrl_probe_dt(struct platform_device *pdev,
-                                          struct at91_pinctrl *info)
+ static int at91_pinctrl_probe_dt(struct platform_device *pdev,
+                                struct at91_pinctrl *info)
  {
        int ret = 0;
        int i, j;
        return 0;
  }
  
- static int __devinit at91_pinctrl_probe(struct platform_device *pdev)
+ static int at91_pinctrl_probe(struct platform_device *pdev)
  {
        struct at91_pinctrl *info;
        struct pinctrl_pin_desc *pdesc;
@@@ -1063,7 -1062,7 +1062,7 @@@ err
        return ret;
  }
  
- static int __devexit at91_pinctrl_remove(struct platform_device *pdev)
+ static int at91_pinctrl_remove(struct platform_device *pdev)
  {
        struct at91_pinctrl *info = platform_get_drvdata(pdev);
  
@@@ -1443,7 -1442,7 +1442,7 @@@ static struct gpio_chip at91_gpio_templ
        .ngpio                  = MAX_NB_GPIO_PER_BANK,
  };
  
- static void __devinit at91_gpio_probe_fixup(void)
+ static void at91_gpio_probe_fixup(void)
  {
        unsigned i;
        struct at91_gpio_chip *at91_gpio, *last = NULL;
        }
  }
  
- static struct of_device_id at91_gpio_of_match[] __devinitdata = {
+ static struct of_device_id at91_gpio_of_match[] = {
        { .compatible = "atmel,at91sam9x5-gpio", .data = &at91sam9x5_ops, },
        { .compatible = "atmel,at91rm9200-gpio", .data = &at91rm9200_ops },
        { /* sentinel */ }
  };
  
- static int __devinit at91_gpio_probe(struct platform_device *pdev)
+ static int at91_gpio_probe(struct platform_device *pdev)
  {
        struct device_node *np = pdev->dev.of_node;
        struct resource *res;
@@@ -1609,7 -1608,7 +1608,7 @@@ static struct platform_driver at91_pinc
                .of_match_table = of_match_ptr(at91_pinctrl_of_match),
        },
        .probe = at91_pinctrl_probe,
-       .remove = __devexit_p(at91_pinctrl_remove),
+       .remove = at91_pinctrl_remove,
  };
  
  static int __init at91_pinctrl_init(void)
index af571dc3dc63250f351199c31ca0b0ba92ebe263,bfe0ba8c32960b542072592da4d2f92040c0edbb..2c9c8e2334da2524f9d9127375cbc7456cda6aae
@@@ -1371,7 -1371,7 +1371,7 @@@ static struct imx_pin_reg imx53_pin_reg
        IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 0, 0x7F8, 1), /* MX53_PAD_GPIO_8__ESAI1_TX5_RX0 */
        IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 1, 0x000, 0), /* MX53_PAD_GPIO_8__GPIO1_8 */
        IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 2, 0x000, 0), /* MX53_PAD_GPIO_8__EPIT2_EPITO */
 -      IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 3, 0x760, 3), /* MX53_PAD_GPIO_8__CAN1_RXCAN */
 +      IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 3, 0x760, 2), /* MX53_PAD_GPIO_8__CAN1_RXCAN */
        IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 4, 0x880, 5), /* MX53_PAD_GPIO_8__UART2_RXD_MUX */
        IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 5, 0x000, 0), /* MX53_PAD_GPIO_8__FIRI_TXD */
        IMX_PIN_REG(MX53_PAD_GPIO_8, 0x6C8, 0x338, 6, 0x000, 0), /* MX53_PAD_GPIO_8__SPDIF_SRCLK */
@@@ -1618,7 -1618,7 +1618,7 @@@ static struct of_device_id imx53_pinctr
        { /* sentinel */ }
  };
  
- static int __devinit imx53_pinctrl_probe(struct platform_device *pdev)
+ static int imx53_pinctrl_probe(struct platform_device *pdev)
  {
        return imx_pinctrl_probe(pdev, &imx53_pinctrl_info);
  }
index 015b093287a449094b4a15408b7b05d255cea048,c68ec404474c93a926c6cd7d56631ca01da55424..1bb16ffb4e41a9d0f252fc8a563188f97f343642
@@@ -259,9 -259,6 +259,9 @@@ static void nmk_prcm_altcx_set_mode(str
        const struct prcm_gpiocr_altcx_pin_desc *pin_desc;
        const u16 *gpiocr_regs;
  
 +      if (!npct->prcm_base)
 +              return;
 +
        if (alt_num > PRCM_IDX_GPIOCR_ALTC_MAX) {
                dev_err(npct->dev, "PRCM GPIOCR: alternate-C%i is invalid\n",
                        alt_num);
@@@ -685,9 -682,6 +685,9 @@@ static int nmk_prcm_gpiocr_get_mode(str
        const struct prcm_gpiocr_altcx_pin_desc *pin_desc;
        const u16 *gpiocr_regs;
  
 +      if (!npct->prcm_base)
 +              return NMK_GPIO_ALT_C;
 +
        for (i = 0; i < npct->soc->npins_altcx; i++) {
                if (npct->soc->altcx_pins[i].pin == gpio)
                        break;
@@@ -1312,7 -1306,7 +1312,7 @@@ const struct irq_domain_ops nmk_gpio_ir
        .xlate = irq_domain_xlate_twocell,
  };
  
- static int __devinit nmk_gpio_probe(struct platform_device *dev)
+ static int nmk_gpio_probe(struct platform_device *dev)
  {
        struct nmk_gpio_platform_data *pdata = dev->dev.platform_data;
        struct device_node *np = dev->dev.of_node;
@@@ -1852,7 -1846,7 +1852,7 @@@ static const struct of_device_id nmk_pi
        {},
  };
  
- static int __devinit nmk_pinctrl_probe(struct platform_device *pdev)
+ static int nmk_pinctrl_probe(struct platform_device *pdev)
  {
        const struct platform_device_id *platid = platform_get_device_id(pdev);
        struct device_node *np = pdev->dev.of_node;
                                "failed to ioremap PRCM registers\n");
                        return -ENOMEM;
                }
 -      } else {
 +      } else if (version == PINCTRL_NMK_STN8815) {
                dev_info(&pdev->dev,
                         "No PRCM base, assume no ALT-Cx control is available\n");
 +      } else {
 +              dev_err(&pdev->dev, "missing PRCM base address\n");
 +              return -EINVAL;
        }
  
        /*
index 30e1a38293a0a07e25c6c665f85fea7e6e7edcb9,c776046f7cb80144efb738e411c1e85da3e2ee30..498b2ba905deb897791e032baf992e4459b88b7e
@@@ -1246,7 -1246,7 +1246,7 @@@ static void __iomem *sirfsoc_rsc_of_iom
        return of_iomap(np, 0);
  }
  
- static int __devinit sirfsoc_pinmux_probe(struct platform_device *pdev)
+ static int sirfsoc_pinmux_probe(struct platform_device *pdev)
  {
        int ret;
        struct sirfsoc_pmx *spmx;
@@@ -1663,45 -1663,7 +1663,45 @@@ const struct irq_domain_ops sirfsoc_gpi
        .xlate = irq_domain_xlate_twocell,
  };
  
- static int __devinit sirfsoc_gpio_probe(struct device_node *np)
 +static void sirfsoc_gpio_set_pullup(const u32 *pullups)
 +{
 +      int i, n;
 +      const unsigned long *p = (const unsigned long *)pullups;
 +
 +      for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
 +              n = find_first_bit(p + i, BITS_PER_LONG);
 +              while (n < BITS_PER_LONG) {
 +                      u32 offset = SIRFSOC_GPIO_CTRL(i, n);
 +                      u32 val = readl(sgpio_bank[i].chip.regs + offset);
 +                      val |= SIRFSOC_GPIO_CTL_PULL_MASK;
 +                      val |= SIRFSOC_GPIO_CTL_PULL_HIGH;
 +                      writel(val, sgpio_bank[i].chip.regs + offset);
 +
 +                      n = find_next_bit(p + i, BITS_PER_LONG, n + 1);
 +              }
 +      }
 +}
 +
 +static void sirfsoc_gpio_set_pulldown(const u32 *pulldowns)
 +{
 +      int i, n;
 +      const unsigned long *p = (const unsigned long *)pulldowns;
 +
 +      for (i = 0; i < SIRFSOC_GPIO_NO_OF_BANKS; i++) {
 +              n = find_first_bit(p + i, BITS_PER_LONG);
 +              while (n < BITS_PER_LONG) {
 +                      u32 offset = SIRFSOC_GPIO_CTRL(i, n);
 +                      u32 val = readl(sgpio_bank[i].chip.regs + offset);
 +                      val |= SIRFSOC_GPIO_CTL_PULL_MASK;
 +                      val &= ~SIRFSOC_GPIO_CTL_PULL_HIGH;
 +                      writel(val, sgpio_bank[i].chip.regs + offset);
 +
 +                      n = find_next_bit(p + i, BITS_PER_LONG, n + 1);
 +              }
 +      }
 +}
 +
+ static int sirfsoc_gpio_probe(struct device_node *np)
  {
        int i, err = 0;
        struct sirfsoc_gpio_bank *bank;
        struct platform_device *pdev;
        bool is_marco = false;
  
 +      u32 pullups[SIRFSOC_GPIO_NO_OF_BANKS], pulldowns[SIRFSOC_GPIO_NO_OF_BANKS];
 +
        pdev = of_find_device_by_node(np);
        if (!pdev)
                return -ENODEV;
                irq_set_handler_data(bank->parent_irq, bank);
        }
  
 +      if (!of_property_read_u32_array(np, "sirf,pullups", pullups,
 +              SIRFSOC_GPIO_NO_OF_BANKS))
 +              sirfsoc_gpio_set_pullup(pullups);
 +
 +      if (!of_property_read_u32_array(np, "sirf,pulldowns", pulldowns,
 +              SIRFSOC_GPIO_NO_OF_BANKS))
 +              sirfsoc_gpio_set_pulldown(pulldowns);
 +
        return 0;
  
  out: