Commit 0b33162e authored by Olof Johansson's avatar Olof Johansson

Merge branch 'late/fixes' into fixes

This is a series from Arnd that fixes a number of compiler warnings
when building defconfigs on ARM.

* late/fixes:
  ARM: footbridge: nw_gpio_lock is raw_spin_lock
  ARM: mv78xx0: correct addr_map_cfg __initdata annotation
  ARM: footbridge: remove RTC_IRQ definition
  ARM: soc: dependency warnings for errata
  ARM: ks8695: __arch_virt_to_dma type handling
  ARM: rpc: check device_register return code in ecard_probe
  ARM: davinci: don't mark da850_register_cpufreq as __init
  ARM: iop13xx: fix iq81340sc_atux_map_irq prototype
  ARM: iop13xx: mark iop13xx_scan_bus as __devinit
  ARM: mv78xx0: mark mv78xx0_timer_init as __init_refok
  ARM: s3c24xx: fix multiple section mismatch warnings
  ARM: at91: unused variable in at91_pm_verify_clocks
  ARM: at91: skip at91_io_desc definition for NOMMU
  ARM: pxa: work around duplicate definition of GPIO24_SSP1_SFRM
  ARM: pxa: remove sharpsl_fatal_check function
  ARM: pxa: define palmte2_pxa_keys conditionally
  ARM: pxa: Wunused-result warning in viper board file
  ARM: shark: fix shark_pci_init return code

Fixed trivial conflicts in arch/arm/mach-at91/setup.c.
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents a4ee7770 45ef6ac6
...@@ -153,7 +153,9 @@ static int at91_pm_verify_clocks(void) ...@@ -153,7 +153,9 @@ static int at91_pm_verify_clocks(void)
} }
} }
#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS if (!IS_ENABLED(CONFIG_AT91_PROGRAMMABLE_CLOCKS))
return 1;
/* PCK0..PCK3 must be disabled, or configured to use clk32k */ /* PCK0..PCK3 must be disabled, or configured to use clk32k */
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
u32 css; u32 css;
...@@ -167,7 +169,6 @@ static int at91_pm_verify_clocks(void) ...@@ -167,7 +169,6 @@ static int at91_pm_verify_clocks(void)
return 0; return 0;
} }
} }
#endif
return 1; return 1;
} }
......
...@@ -87,7 +87,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length) ...@@ -87,7 +87,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length)
iotable_init(desc, 1); iotable_init(desc, 1);
} }
static struct map_desc at91_io_desc __initdata = { static struct map_desc at91_io_desc __initdata __maybe_unused = {
.virtual = (unsigned long)AT91_VA_BASE_SYS, .virtual = (unsigned long)AT91_VA_BASE_SYS,
.pfn = __phys_to_pfn(AT91_BASE_SYS), .pfn = __phys_to_pfn(AT91_BASE_SYS),
.length = SZ_16K, .length = SZ_16K,
......
...@@ -939,7 +939,7 @@ static struct platform_device da850_cpufreq_device = { ...@@ -939,7 +939,7 @@ static struct platform_device da850_cpufreq_device = {
unsigned int da850_max_speed = 300000; unsigned int da850_max_speed = 300000;
int __init da850_register_cpufreq(char *async_clk) int da850_register_cpufreq(char *async_clk)
{ {
int i; int i;
......
...@@ -89,8 +89,6 @@ ...@@ -89,8 +89,6 @@
#define IRQ_NETWINDER_VGA _ISA_IRQ(11) #define IRQ_NETWINDER_VGA _ISA_IRQ(11)
#define IRQ_NETWINDER_SOUND _ISA_IRQ(12) #define IRQ_NETWINDER_SOUND _ISA_IRQ(12)
#undef RTC_IRQ
#define RTC_IRQ IRQ_ISA_RTC_ALARM
#define I8042_KBD_IRQ IRQ_ISA_KEYBOARD #define I8042_KBD_IRQ IRQ_ISA_KEYBOARD
#define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE) #define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
#define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY #define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
extern int init_atu; extern int init_atu;
static int __init static int __init
iq81340sc_atux_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) iq81340sc_atux_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin)
{ {
WARN_ON(idsel < 1 || idsel > 2); WARN_ON(idsel < 1 || idsel > 2);
......
...@@ -504,7 +504,7 @@ iop13xx_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) ...@@ -504,7 +504,7 @@ iop13xx_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
/* Scan an IOP13XX PCI bus. nr selects which ATU we use. /* Scan an IOP13XX PCI bus. nr selects which ATU we use.
*/ */
struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *sys) struct pci_bus * __devinit iop13xx_scan_bus(int nr, struct pci_sys_data *sys)
{ {
int which_atu; int which_atu;
struct pci_bus *bus = NULL; struct pci_bus *bus = NULL;
......
...@@ -34,7 +34,8 @@ extern struct bus_type platform_bus_type; ...@@ -34,7 +34,8 @@ extern struct bus_type platform_bus_type;
#define __arch_dma_to_virt(dev, x) ({ (void *) (is_lbus_device(dev) ? \ #define __arch_dma_to_virt(dev, x) ({ (void *) (is_lbus_device(dev) ? \
__phys_to_virt(x) : __bus_to_virt(x)); }) __phys_to_virt(x) : __bus_to_virt(x)); })
#define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \ #define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \
(dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); }) (dma_addr_t)__virt_to_phys((unsigned long)x) \
: (dma_addr_t)__virt_to_bus(x); })
#define __arch_pfn_to_dma(dev, pfn) \ #define __arch_pfn_to_dma(dev, pfn) \
({ dma_addr_t __dma = __pfn_to_phys(pfn); \ ({ dma_addr_t __dma = __pfn_to_phys(pfn); \
if (!is_lbus_device(dev)) \ if (!is_lbus_device(dev)) \
......
...@@ -54,7 +54,7 @@ static void __init __iomem *win_cfg_base(const struct orion_addr_map_cfg *cfg, i ...@@ -54,7 +54,7 @@ static void __init __iomem *win_cfg_base(const struct orion_addr_map_cfg *cfg, i
/* /*
* Description of the windows needed by the platform code * Description of the windows needed by the platform code
*/ */
static struct __initdata orion_addr_map_cfg addr_map_cfg = { static struct orion_addr_map_cfg addr_map_cfg __initdata = {
.num_wins = 14, .num_wins = 14,
.remappable_wins = 8, .remappable_wins = 8,
.win_cfg_base = win_cfg_base, .win_cfg_base = win_cfg_base,
......
...@@ -336,7 +336,7 @@ void __init mv78xx0_init_early(void) ...@@ -336,7 +336,7 @@ void __init mv78xx0_init_early(void)
orion_time_set_base(TIMER_VIRT_BASE); orion_time_set_base(TIMER_VIRT_BASE);
} }
static void mv78xx0_timer_init(void) static void __init_refok mv78xx0_timer_init(void)
{ {
orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
IRQ_MV78XX0_TIMER_1, get_tclk()); IRQ_MV78XX0_TIMER_1, get_tclk());
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/pxa25x.h> #include <mach/pxa25x.h>
#undef GPIO24_SSP1_SFRM
#include <mach/pxa27x.h> #include <mach/pxa27x.h>
#include <mach/audio.h> #include <mach/audio.h>
#include <linux/platform_data/video-pxafb.h> #include <linux/platform_data/video-pxafb.h>
......
...@@ -105,6 +105,7 @@ static struct pxamci_platform_data palmte2_mci_platform_data = { ...@@ -105,6 +105,7 @@ static struct pxamci_platform_data palmte2_mci_platform_data = {
.gpio_power = GPIO_NR_PALMTE2_SD_POWER, .gpio_power = GPIO_NR_PALMTE2_SD_POWER,
}; };
#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
/****************************************************************************** /******************************************************************************
* GPIO keys * GPIO keys
******************************************************************************/ ******************************************************************************/
...@@ -132,6 +133,7 @@ static struct platform_device palmte2_pxa_keys = { ...@@ -132,6 +133,7 @@ static struct platform_device palmte2_pxa_keys = {
.platform_data = &palmte2_pxa_keys_data, .platform_data = &palmte2_pxa_keys_data,
}, },
}; };
#endif
/****************************************************************************** /******************************************************************************
* Backlight * Backlight
......
...@@ -55,7 +55,6 @@ ...@@ -55,7 +55,6 @@
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int sharpsl_off_charge_battery(void); static int sharpsl_off_charge_battery(void);
static int sharpsl_check_battery_voltage(void); static int sharpsl_check_battery_voltage(void);
static int sharpsl_fatal_check(void);
#endif #endif
static int sharpsl_check_battery_temp(void); static int sharpsl_check_battery_temp(void);
static int sharpsl_ac_check(void); static int sharpsl_ac_check(void);
...@@ -686,53 +685,6 @@ static int corgi_pxa_pm_enter(suspend_state_t state) ...@@ -686,53 +685,6 @@ static int corgi_pxa_pm_enter(suspend_state_t state)
return 0; return 0;
} }
/*
* Check for fatal battery errors
* Fatal returns -1
*/
static int sharpsl_fatal_check(void)
{
int buff[5], temp, i, acin;
dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check entered\n");
/* Check AC-Adapter */
acin = sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN);
if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) {
sharpsl_pm.machinfo->charge(0);
udelay(100);
sharpsl_pm.machinfo->discharge(1); /* enable discharge */
mdelay(SHARPSL_WAIT_DISCHARGE_ON);
}
if (sharpsl_pm.machinfo->discharge1)
sharpsl_pm.machinfo->discharge1(1);
/* Check battery : check inserting battery ? */
for (i = 0; i < 5; i++) {
buff[i] = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT);
mdelay(SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT);
}
if (sharpsl_pm.machinfo->discharge1)
sharpsl_pm.machinfo->discharge1(0);
if (acin && (sharpsl_pm.charge_mode == CHRG_ON)) {
udelay(100);
sharpsl_pm.machinfo->charge(1);
sharpsl_pm.machinfo->discharge(0);
}
temp = get_select_val(buff);
dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %ld\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT));
if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) ||
(!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt)))
return -1;
return 0;
}
static int sharpsl_off_charge_error(void) static int sharpsl_off_charge_error(void)
{ {
dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n"); dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n");
......
...@@ -768,8 +768,7 @@ static unsigned long viper_tpm; ...@@ -768,8 +768,7 @@ static unsigned long viper_tpm;
static int __init viper_tpm_setup(char *str) static int __init viper_tpm_setup(char *str)
{ {
strict_strtoul(str, 10, &viper_tpm); return strict_strtoul(str, 10, &viper_tpm) >= 0;
return 1;
} }
__setup("tpm=", viper_tpm_setup); __setup("tpm=", viper_tpm_setup);
......
...@@ -960,7 +960,9 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type) ...@@ -960,7 +960,9 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
*ecp = ec; *ecp = ec;
slot_to_expcard[slot] = ec; slot_to_expcard[slot] = ec;
device_register(&ec->dev); rc = device_register(&ec->dev);
if (rc)
goto nodev;
return 0; return 0;
......
...@@ -232,7 +232,7 @@ struct irq_chip s3c2416_irq_second = { ...@@ -232,7 +232,7 @@ struct irq_chip s3c2416_irq_second = {
/* IRQ initialisation code */ /* IRQ initialisation code */
static int __init s3c2416_add_sub(unsigned int base, static int s3c2416_add_sub(unsigned int base,
void (*demux)(unsigned int, void (*demux)(unsigned int,
struct irq_desc *), struct irq_desc *),
struct irq_chip *chip, struct irq_chip *chip,
...@@ -251,7 +251,7 @@ static int __init s3c2416_add_sub(unsigned int base, ...@@ -251,7 +251,7 @@ static int __init s3c2416_add_sub(unsigned int base,
return 0; return 0;
} }
static void __init s3c2416_irq_add_second(void) static void s3c2416_irq_add_second(void)
{ {
unsigned long pend; unsigned long pend;
unsigned long last; unsigned long last;
...@@ -287,7 +287,7 @@ static void __init s3c2416_irq_add_second(void) ...@@ -287,7 +287,7 @@ static void __init s3c2416_irq_add_second(void)
} }
} }
static int __init s3c2416_irq_add(struct device *dev, static int s3c2416_irq_add(struct device *dev,
struct subsys_interface *sif) struct subsys_interface *sif)
{ {
printk(KERN_INFO "S3C2416: IRQ Support\n"); printk(KERN_INFO "S3C2416: IRQ Support\n");
......
...@@ -222,7 +222,7 @@ static struct irq_chip s3c2443_irq_cam = { ...@@ -222,7 +222,7 @@ static struct irq_chip s3c2443_irq_cam = {
/* IRQ initialisation code */ /* IRQ initialisation code */
static int __init s3c2443_add_sub(unsigned int base, static int s3c2443_add_sub(unsigned int base,
void (*demux)(unsigned int, void (*demux)(unsigned int,
struct irq_desc *), struct irq_desc *),
struct irq_chip *chip, struct irq_chip *chip,
...@@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base, ...@@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base,
return 0; return 0;
} }
static int __init s3c2443_irq_add(struct device *dev, static int s3c2443_irq_add(struct device *dev,
struct subsys_interface *sif) struct subsys_interface *sif)
{ {
printk("S3C2443: IRQ Support\n"); printk("S3C2443: IRQ Support\n");
......
...@@ -104,7 +104,7 @@ static struct s3c2410_hcd_info usb_simtec_info __initdata = { ...@@ -104,7 +104,7 @@ static struct s3c2410_hcd_info usb_simtec_info __initdata = {
}; };
int usb_simtec_init(void) int __init usb_simtec_init(void)
{ {
int ret; int ret;
......
...@@ -41,7 +41,7 @@ static struct hw_pci shark_pci __initdata = { ...@@ -41,7 +41,7 @@ static struct hw_pci shark_pci __initdata = {
static int __init shark_pci_init(void) static int __init shark_pci_init(void)
{ {
if (!machine_is_shark()) if (!machine_is_shark())
return; return -ENODEV;
pcibios_min_io = 0x6000; pcibios_min_io = 0x6000;
pcibios_min_mem = 0x50000000; pcibios_min_mem = 0x50000000;
......
...@@ -16,7 +16,7 @@ config ARCH_TEGRA_2x_SOC ...@@ -16,7 +16,7 @@ config ARCH_TEGRA_2x_SOC
select ARM_ERRATA_742230 select ARM_ERRATA_742230
select ARM_ERRATA_751472 select ARM_ERRATA_751472
select ARM_ERRATA_754327 select ARM_ERRATA_754327
select ARM_ERRATA_764369 select ARM_ERRATA_764369 if SMP
select PL310_ERRATA_727915 if CACHE_L2X0 select PL310_ERRATA_727915 if CACHE_L2X0
select PL310_ERRATA_769419 if CACHE_L2X0 select PL310_ERRATA_769419 if CACHE_L2X0
select CPU_FREQ_TABLE if CPU_FREQ select CPU_FREQ_TABLE if CPU_FREQ
...@@ -37,7 +37,7 @@ config ARCH_TEGRA_3x_SOC ...@@ -37,7 +37,7 @@ config ARCH_TEGRA_3x_SOC
select ARM_ERRATA_743622 select ARM_ERRATA_743622
select ARM_ERRATA_751472 select ARM_ERRATA_751472
select ARM_ERRATA_754322 select ARM_ERRATA_754322
select ARM_ERRATA_764369 select ARM_ERRATA_764369 if SMP
select PL310_ERRATA_769419 if CACHE_L2X0 select PL310_ERRATA_769419 if CACHE_L2X0
select CPU_FREQ_TABLE if CPU_FREQ select CPU_FREQ_TABLE if CPU_FREQ
help help
......
...@@ -5,9 +5,9 @@ config UX500_SOC_COMMON ...@@ -5,9 +5,9 @@ config UX500_SOC_COMMON
default y default y
select ARM_GIC select ARM_GIC
select HAS_MTU select HAS_MTU
select PL310_ERRATA_753970 select PL310_ERRATA_753970 if CACHE_PL310
select ARM_ERRATA_754322 select ARM_ERRATA_754322
select ARM_ERRATA_764369 select ARM_ERRATA_764369 if SMP
select CACHE_L2X0 select CACHE_L2X0
select PINCTRL select PINCTRL
select PINCTRL_NOMADIK select PINCTRL_NOMADIK
......
...@@ -74,21 +74,21 @@ static inline void netwinder_ds1620_reset(void) ...@@ -74,21 +74,21 @@ static inline void netwinder_ds1620_reset(void)
static inline void netwinder_lock(unsigned long *flags) static inline void netwinder_lock(unsigned long *flags)
{ {
spin_lock_irqsave(&nw_gpio_lock, *flags); raw_spin_lock_irqsave(&nw_gpio_lock, *flags);
} }
static inline void netwinder_unlock(unsigned long *flags) static inline void netwinder_unlock(unsigned long *flags)
{ {
spin_unlock_irqrestore(&nw_gpio_lock, *flags); raw_spin_unlock_irqrestore(&nw_gpio_lock, *flags);
} }
static inline void netwinder_set_fan(int i) static inline void netwinder_set_fan(int i)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&nw_gpio_lock, flags); raw_spin_lock_irqsave(&nw_gpio_lock, flags);
nw_gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0); nw_gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0);
spin_unlock_irqrestore(&nw_gpio_lock, flags); raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);
} }
static inline int netwinder_get_fan(void) static inline int netwinder_get_fan(void)
......
...@@ -583,9 +583,9 @@ static void kick_open(void) ...@@ -583,9 +583,9 @@ static void kick_open(void)
* we want to write a bit pattern XXX1 to Xilinx to enable * we want to write a bit pattern XXX1 to Xilinx to enable
* the write gate, which will be open for about the next 2ms. * the write gate, which will be open for about the next 2ms.
*/ */
spin_lock_irqsave(&nw_gpio_lock, flags); raw_spin_lock_irqsave(&nw_gpio_lock, flags);
nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE); nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE);
spin_unlock_irqrestore(&nw_gpio_lock, flags); raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);
/* /*
* let the ISA bus to catch on... * let the ISA bus to catch on...
......
...@@ -1482,9 +1482,9 @@ vnc_mute_spkr(wavnc_info *devc) ...@@ -1482,9 +1482,9 @@ vnc_mute_spkr(wavnc_info *devc)
{ {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&nw_gpio_lock, flags); raw_spin_lock_irqsave(&nw_gpio_lock, flags);
nw_cpld_modify(CPLD_UNMUTE, devc->spkr_mute_state ? 0 : CPLD_UNMUTE); nw_cpld_modify(CPLD_UNMUTE, devc->spkr_mute_state ? 0 : CPLD_UNMUTE);
spin_unlock_irqrestore(&nw_gpio_lock, flags); raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment