atheros: remove useless return
[openwrt.git] / target / linux / atheros / patches-3.14 / 100-board.patch
index 0e1b6b5..a19e4b3 100644 (file)
@@ -84,7 +84,7 @@
 +obj-$(CONFIG_ATHEROS_AR2315) += ar2315.o
 --- /dev/null
 +++ b/arch/mips/ar231x/board.c
-@@ -0,0 +1,261 @@
+@@ -0,0 +1,263 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file "COPYING" in the main directory of this archive
 +#include <linux/io.h>
 +#include <asm/irq_cpu.h>
 +#include <asm/reboot.h>
++#include <asm/bootinfo.h>
++#include <asm/time.h>
 +
 +#include <ar231x_platform.h>
 +#include "devices.h"
 +
 +      if (!found) {
 +              pr_warn("WARNING: Could not find Radio Configuration data\n");
-+              radio_config = 0;
++              radio_config = NULL;
 +      }
 +
 +      return radio_config;
 +#endif /* __ASM_MACH_AR231X_CPU_FEATURE_OVERRIDES_H */
 --- /dev/null
 +++ b/arch/mips/include/asm/mach-ar231x/dma-coherence.h
-@@ -0,0 +1,79 @@
+@@ -0,0 +1,78 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file "COPYING" in the main directory of this archive
 +
 +static inline void plat_extra_sync_for_device(struct device *dev)
 +{
-+      return;
 +}
 +
 +static inline int plat_dma_mapping_error(struct device *dev,
 +
 --- /dev/null
 +++ b/arch/mips/ar231x/ar5312.c
-@@ -0,0 +1,540 @@
+@@ -0,0 +1,542 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file "COPYING" in the main directory of this archive
 +      ar231x_irq_dispatch = ar5312_irq_dispatch;
 +      for (i = 0; i < AR5312_MISC_IRQ_COUNT; i++) {
 +              int irq = AR231X_MISC_IRQ_BASE + i;
++
 +              irq_set_chip_and_handler(irq, &ar5312_misc_irq_chip,
 +                                       handle_level_irq);
 +      }
 +ar5312_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value)
 +{
 +      u32 reg = ar231x_read_reg(AR5312_GPIO_DO);
++
 +      reg = value ? reg | (1 << gpio) : reg & ~(1 << gpio);
 +      ar231x_write_reg(AR5312_GPIO_DO, reg);
 +}
 +static int __init
 +ar5312_gpio_init(void)
 +{
-+      int ret;
-+      ret = gpiochip_add(&ar5312_gpio_chip);
++      int ret = gpiochip_add(&ar5312_gpio_chip);
++
 +      if (ret) {
 +              pr_err("%s: failed to add gpiochip\n", ar5312_gpio_chip.label);
 +              return ret;
 +
 --- /dev/null
 +++ b/arch/mips/ar231x/ar2315.c
-@@ -0,0 +1,556 @@
+@@ -0,0 +1,559 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file "COPYING" in the main directory of this archive
 +      gpiointval = ar231x_read_reg(AR2315_GPIO_DI);
 +      for (i = 0; i < AR2315_MISC_IRQ_COUNT; i++) {
 +              int irq = AR231X_MISC_IRQ_BASE + i;
++
 +              irq_set_chip_and_handler(irq, &ar2315_misc_irq_chip,
 +                      handle_level_irq);
 +      }
 +      for (i = 0; i < AR2315_NUM_GPIO; i++) {
 +              int irq = AR231X_GPIO_IRQ_BASE + i;
++
 +              irq_set_chip_and_handler(irq, &ar2315_gpio_irq_chip,
 +                      handle_level_irq);
 +      }
 +ar2315_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value)
 +{
 +      u32 reg = ar231x_read_reg(AR2315_GPIO_DO);
++
 +      reg = value ? reg | (1 << gpio) : reg & ~(1 << gpio);
 +      ar231x_write_reg(AR2315_GPIO_DO, reg);
 +}
 +static int __init
 +ar2315_gpio_init(void)
 +{
-+      int ret;
-+      ret = gpiochip_add(&ar2315_gpio_chip);
++      int ret = gpiochip_add(&ar2315_gpio_chip);
++
 +      if (ret) {
 +              pr_err("%s: failed to add gpiochip\n", ar2315_gpio_chip.label);
 +              return ret;
 +#endif
 --- /dev/null
 +++ b/arch/mips/ar231x/devices.c
-@@ -0,0 +1,180 @@
+@@ -0,0 +1,182 @@
 +#include <linux/kernel.h>
 +#include <linux/init.h>
 +#include <linux/serial.h>
 +#include <linux/serial_core.h>
 +#include <linux/serial_8250.h>
 +#include <linux/platform_device.h>
++#include <asm/bootinfo.h>
++
 +#include <ar231x_platform.h>
 +#include <ar231x.h>
 +#include "devices.h"