mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
8c3d4534a8
Several function declarations used only in the files in which they're declared should include the static keyword, but don't: arch/arm/mach-omap2/serial.c:248:6: warning: symbol 'cmdline_find_option' was not declared. Should it be static? arch/arm/mach-omap2/omap-wakeupgen.c:259:6: warning: symbol 'irq_sar_clear' was not declared. Should it be static? arch/arm/mach-omap2/board-rx51-peripherals.c:878:27: warning: symbol 'rx51_vibra_data' was not declared. Should it be static? arch/arm/mach-omap2/board-rx51-peripherals.c:882:27: warning: symbol 'rx51_audio_data' was not declared. Should it be static? arch/arm/mach-omap2/board-omap4panda.c:201:29: warning: symbol 'omap_panda_wlan_data' was not declared. Should it be static? arch/arm/mach-omap2/board-omap4panda.c:393:24: warning: symbol 'omap4_panda_dvi_device' was not declared. Should it be static? arch/arm/mach-omap2/board-omap4panda.c:403:12: warning: symbol 'omap4_panda_dvi_init' was not declared. Should it be static? arch/arm/mach-omap2/board-omap4panda.c:464:6: warning: symbol 'omap4_panda_display_init' was not declared. Should it be static? arch/arm/mach-omap2/hsmmc.c:434:6: warning: symbol 'omap_init_hsmmc' was not declared. Should it be static? arch/arm/mach-omap2/hwspinlock.c:31:12: warning: symbol 'hwspinlocks_init' was not declared. Should it be static? arch/arm/mach-omap1/timer.c:58:12: warning: symbol 'omap1_dm_timer_init' was not declared. Should it be static? arch/arm/mach-omap1/fpga.c:90:6: warning: symbol 'innovator_fpga_IRQ_demux' was not declared. Should it be static? Mark all of these as static. Thanks to Arnd Bergmann <arnd@arndb.de> for pointing out a typo in the original patch description. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Govindraj R <govindraj.raja@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: David Anders <x0132446@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
61 lines
1.7 KiB
C
61 lines
1.7 KiB
C
/*
|
|
* OMAP hardware spinlock device initialization
|
|
*
|
|
* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com
|
|
*
|
|
* Contact: Simon Que <sque@ti.com>
|
|
* Hari Kanigeri <h-kanigeri2@ti.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*/
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/init.h>
|
|
#include <linux/err.h>
|
|
#include <linux/hwspinlock.h>
|
|
|
|
#include <plat/omap_hwmod.h>
|
|
#include <plat/omap_device.h>
|
|
|
|
static struct hwspinlock_pdata omap_hwspinlock_pdata __initdata = {
|
|
.base_id = 0,
|
|
};
|
|
|
|
static int __init hwspinlocks_init(void)
|
|
{
|
|
int retval = 0;
|
|
struct omap_hwmod *oh;
|
|
struct platform_device *pdev;
|
|
const char *oh_name = "spinlock";
|
|
const char *dev_name = "omap_hwspinlock";
|
|
|
|
/*
|
|
* Hwmod lookup will fail in case our platform doesn't support the
|
|
* hardware spinlock module, so it is safe to run this initcall
|
|
* on all omaps
|
|
*/
|
|
oh = omap_hwmod_lookup(oh_name);
|
|
if (oh == NULL)
|
|
return -EINVAL;
|
|
|
|
pdev = omap_device_build(dev_name, 0, oh, &omap_hwspinlock_pdata,
|
|
sizeof(struct hwspinlock_pdata),
|
|
NULL, 0, false);
|
|
if (IS_ERR(pdev)) {
|
|
pr_err("Can't build omap_device for %s:%s\n", dev_name,
|
|
oh_name);
|
|
retval = PTR_ERR(pdev);
|
|
}
|
|
|
|
return retval;
|
|
}
|
|
/* early board code might need to reserve specific hwspinlock instances */
|
|
postcore_initcall(hwspinlocks_init);
|