Skip to content

Commit

Permalink
Merge branch 'late/fixes' into fixes
Browse files Browse the repository at this point in the history
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: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Oct 7, 2012
2 parents a4ee777 + 45ef6ac commit 0b33162
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 81 deletions.
5 changes: 3 additions & 2 deletions arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
for (i = 0; i < 4; i++) {
u32 css;
Expand All @@ -167,7 +169,6 @@ static int at91_pm_verify_clocks(void)
return 0;
}
}
#endif

return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void __init at91_init_sram(int bank, unsigned long base, unsigned int length)
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,
.pfn = __phys_to_pfn(AT91_BASE_SYS),
.length = SZ_16K,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/da850.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ static struct platform_device da850_cpufreq_device = {

unsigned int da850_max_speed = 300000;

int __init da850_register_cpufreq(char *async_clk)
int da850_register_cpufreq(char *async_clk)
{
int i;

Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-footbridge/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@
#define IRQ_NETWINDER_VGA _ISA_IRQ(11)
#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_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
#define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-iop13xx/iq81340sc.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
extern int init_atu;

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);

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-iop13xx/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
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;
struct pci_bus *bus = NULL;
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-ks8695/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ extern struct bus_type platform_bus_type;
#define __arch_dma_to_virt(dev, x) ({ (void *) (is_lbus_device(dev) ? \
__phys_to_virt(x) : __bus_to_virt(x)); })
#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) \
({ dma_addr_t __dma = __pfn_to_phys(pfn); \
if (!is_lbus_device(dev)) \
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mv78xx0/addr-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
static struct __initdata orion_addr_map_cfg addr_map_cfg = {
static struct orion_addr_map_cfg addr_map_cfg __initdata = {
.num_wins = 14,
.remappable_wins = 8,
.win_cfg_base = win_cfg_base,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mv78xx0/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ void __init mv78xx0_init_early(void)
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,
IRQ_MV78XX0_TIMER_1, get_tclk());
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-pxa/cm-x2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <asm/mach/map.h>

#include <mach/pxa25x.h>
#undef GPIO24_SSP1_SFRM
#include <mach/pxa27x.h>
#include <mach/audio.h>
#include <linux/platform_data/video-pxafb.h>
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-pxa/palmte2.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static struct pxamci_platform_data palmte2_mci_platform_data = {
.gpio_power = GPIO_NR_PALMTE2_SD_POWER,
};

#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
/******************************************************************************
* GPIO keys
******************************************************************************/
Expand Down Expand Up @@ -132,6 +133,7 @@ static struct platform_device palmte2_pxa_keys = {
.platform_data = &palmte2_pxa_keys_data,
},
};
#endif

/******************************************************************************
* Backlight
Expand Down
48 changes: 0 additions & 48 deletions arch/arm/mach-pxa/sharpsl_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#ifdef CONFIG_PM
static int sharpsl_off_charge_battery(void);
static int sharpsl_check_battery_voltage(void);
static int sharpsl_fatal_check(void);
#endif
static int sharpsl_check_battery_temp(void);
static int sharpsl_ac_check(void);
Expand Down Expand Up @@ -686,53 +685,6 @@ static int corgi_pxa_pm_enter(suspend_state_t state)
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)
{
dev_err(sharpsl_pm.dev, "Offline Charger: Error occurred.\n");
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-pxa/viper.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,7 @@ static unsigned long viper_tpm;

static int __init viper_tpm_setup(char *str)
{
strict_strtoul(str, 10, &viper_tpm);
return 1;
return strict_strtoul(str, 10, &viper_tpm) >= 0;
}

__setup("tpm=", viper_tpm_setup);
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-rpc/ecard.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,9 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
*ecp = ec;
slot_to_expcard[slot] = ec;

device_register(&ec->dev);
rc = device_register(&ec->dev);
if (rc)
goto nodev;

return 0;

Expand Down
6 changes: 3 additions & 3 deletions arch/arm/mach-s3c24xx/irq-s3c2416.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ struct irq_chip s3c2416_irq_second = {

/* IRQ initialisation code */

static int __init s3c2416_add_sub(unsigned int base,
static int s3c2416_add_sub(unsigned int base,
void (*demux)(unsigned int,
struct irq_desc *),
struct irq_chip *chip,
Expand All @@ -251,7 +251,7 @@ static int __init s3c2416_add_sub(unsigned int base,
return 0;
}

static void __init s3c2416_irq_add_second(void)
static void s3c2416_irq_add_second(void)
{
unsigned long pend;
unsigned long last;
Expand Down Expand Up @@ -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)
{
printk(KERN_INFO "S3C2416: IRQ Support\n");
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-s3c24xx/irq-s3c2443.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static struct irq_chip s3c2443_irq_cam = {

/* IRQ initialisation code */

static int __init s3c2443_add_sub(unsigned int base,
static int s3c2443_add_sub(unsigned int base,
void (*demux)(unsigned int,
struct irq_desc *),
struct irq_chip *chip,
Expand All @@ -241,7 +241,7 @@ static int __init s3c2443_add_sub(unsigned int base,
return 0;
}

static int __init s3c2443_irq_add(struct device *dev,
static int s3c2443_irq_add(struct device *dev,
struct subsys_interface *sif)
{
printk("S3C2443: IRQ Support\n");
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c24xx/simtec-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-shark/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static struct hw_pci shark_pci __initdata = {
static int __init shark_pci_init(void)
{
if (!machine_is_shark())
return;
return -ENODEV;

pcibios_min_io = 0x6000;
pcibios_min_mem = 0x50000000;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-tegra/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ config ARCH_TEGRA_2x_SOC
select ARM_ERRATA_742230
select ARM_ERRATA_751472
select ARM_ERRATA_754327
select ARM_ERRATA_764369
select ARM_ERRATA_764369 if SMP
select PL310_ERRATA_727915 if CACHE_L2X0
select PL310_ERRATA_769419 if CACHE_L2X0
select CPU_FREQ_TABLE if CPU_FREQ
Expand All @@ -37,7 +37,7 @@ config ARCH_TEGRA_3x_SOC
select ARM_ERRATA_743622
select ARM_ERRATA_751472
select ARM_ERRATA_754322
select ARM_ERRATA_764369
select ARM_ERRATA_764369 if SMP
select PL310_ERRATA_769419 if CACHE_L2X0
select CPU_FREQ_TABLE if CPU_FREQ
help
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-ux500/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ config UX500_SOC_COMMON
default y
select ARM_GIC
select HAS_MTU
select PL310_ERRATA_753970
select PL310_ERRATA_753970 if CACHE_PL310
select ARM_ERRATA_754322
select ARM_ERRATA_764369
select ARM_ERRATA_764369 if SMP
select CACHE_L2X0
select PINCTRL
select PINCTRL_NOMADIK
Expand Down
8 changes: 4 additions & 4 deletions drivers/char/ds1620.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,21 @@ static inline void netwinder_ds1620_reset(void)

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)
{
spin_unlock_irqrestore(&nw_gpio_lock, *flags);
raw_spin_unlock_irqrestore(&nw_gpio_lock, *flags);
}

static inline void netwinder_set_fan(int i)
{
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);
spin_unlock_irqrestore(&nw_gpio_lock, flags);
raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);
}

static inline int netwinder_get_fan(void)
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/nwflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,9 @@ static void kick_open(void)
* we want to write a bit pattern XXX1 to Xilinx to enable
* 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);
spin_unlock_irqrestore(&nw_gpio_lock, flags);
raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);

/*
* let the ISA bus to catch on...
Expand Down
4 changes: 2 additions & 2 deletions sound/oss/waveartist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,9 +1482,9 @@ vnc_mute_spkr(wavnc_info *devc)
{
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);
spin_unlock_irqrestore(&nw_gpio_lock, flags);
raw_spin_unlock_irqrestore(&nw_gpio_lock, flags);
}

static void
Expand Down

0 comments on commit 0b33162

Please sign in to comment.