summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSachin Nikam <snikam@nvidia.com>2010-05-25 13:44:14 +0530
committerGary King <gking@nvidia.com>2010-05-27 07:42:58 -0700
commitc3be44e23d3a57643cb12f8369cf26e9ad339988 (patch)
tree72dbf4b95d9a8838bb1ba7b03b21e53504c5738c
parent7d05987b03a7bd6c0ab9d2043ce2dcfb19f53e02 (diff)
warnings: Fixing kernel compilation warnings.
Bug 682070 Change-Id: Ieff4ca65dc7034786ddfe0657585d66957bc7f3d Reviewed-on: http://git-master/r/1577 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Tested-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/board_nvodm.c6
-rw-r--r--arch/arm/mach-tegra/dma.c4
-rw-r--r--arch/arm/mach-tegra/init_common.c64
-rwxr-xr-xarch/arm/mach-tegra/nvrpc_user.c2
-rw-r--r--drivers/input/keyboard/tegra-nvec.c4
-rw-r--r--drivers/input/misc/tegra_odm_scroll.c1
-rw-r--r--sound/soc/tegra/tegra_transport.c6
7 files changed, 10 insertions, 77 deletions
diff --git a/arch/arm/mach-tegra/board_nvodm.c b/arch/arm/mach-tegra/board_nvodm.c
index bc3be0e24ef6..1e3ccd349fc7 100644
--- a/arch/arm/mach-tegra/board_nvodm.c
+++ b/arch/arm/mach-tegra/board_nvodm.c
@@ -28,7 +28,7 @@
#include <linux/i2c.h>
#include <linux/pm.h>
#include <linux/spi/spi.h>
-#if CONFIG_KEYBOARD_GPIO
+#if defined(CONFIG_KEYBOARD_GPIO)
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include "include/mach/gpio-names.h"
@@ -138,7 +138,7 @@ static struct platform_device tegra_nand_device =
#endif
-#if CONFIG_KEYBOARD_GPIO
+#if defined(CONFIG_KEYBOARD_GPIO)
static struct gpio_keys_button tegra_buttons[] = {
{
.gpio = TEGRA_GPIO_PU5,
@@ -615,7 +615,7 @@ static void __init tegra_machine_init(void)
tegra_set_voltage( NV_VDD_PEX_CLK_ODM_ID, 0);
#endif
-#if CONFIG_KEYBOARD_GPIO
+#if defined(CONFIG_KEYBOARD_GPIO)
platform_device_register(&tegra_button_device);
#endif
diff --git a/arch/arm/mach-tegra/dma.c b/arch/arm/mach-tegra/dma.c
index e8c95cb4d917..fa660ec3a74d 100644
--- a/arch/arm/mach-tegra/dma.c
+++ b/arch/arm/mach-tegra/dma.c
@@ -621,7 +621,7 @@ static void tegra_dma_init_hw(struct tegra_dma_channel *ch)
static void handle_oneshot_dma(struct tegra_dma_channel *ch)
{
struct tegra_dma_req *req;
- unsigned int irq_flags;
+ unsigned long irq_flags;
spin_lock_irqsave(&ch->lock, irq_flags);
if (list_empty(&ch->list)) {
@@ -807,7 +807,7 @@ int __init tegra_dma_init(void)
goto fail;
modid = NVRM_MODULE_ID(NvRmPrivModuleID_ApbDmaChannel, i);
- NvRmModuleGetBaseAddress(s_hRmGlobal, modid, &ch->phys_addr,
+ NvRmModuleGetBaseAddress(s_hRmGlobal, modid, (NvRmPhysAddr *)&ch->phys_addr,
&size);
ch->addr = IO_ADDRESS(ch->phys_addr);
if (!ch->addr) {
diff --git a/arch/arm/mach-tegra/init_common.c b/arch/arm/mach-tegra/init_common.c
index 677d17eb8388..0d572830c3f8 100644
--- a/arch/arm/mach-tegra/init_common.c
+++ b/arch/arm/mach-tegra/init_common.c
@@ -304,70 +304,6 @@ fail:
#if !defined(CONFIG_I2C_TEGRA)
#define tegra_register_i2c() do { } while (0)
#else
-static int __init tegra_map_i2c_odm_to_bus(NvOdmIoModule Module,
- NvU32 Instance, NvU32 PinMuxConfig)
-{
- NvOdmIoModule SearchModule;
- NvU32 SearchInstance;
- int cnt = 0;
-
- const NvU32 *pPinMuxes;
- NvU32 NumPinMuxes;
-
- // FIXME: Pinmux multiplexing is an ugly hack.. we instantiate
- // "N" buses (hard-coded to the maximum number of I2C instance 2
- // configurations), and assign peripherals to the bus ID which
- // matches the requested pin mux. Too much chip-specific stuff
- // here, but pin-muxing has always been ugly...
- if (PinMuxConfig && (Module!=NvOdmIoModule_I2c || Instance!= 2 ||
- PinMuxConfig > NvOdmI2cPinMap_Config4))
- return -1;
-
- for (SearchModule = NvOdmIoModule_I2c_Pmu;
- SearchModule >= NvOdmIoModule_I2c;
- SearchModule--)
- {
- NvOdmQueryPinMux(SearchModule, &pPinMuxes, &NumPinMuxes);
- for (SearchInstance = 0; SearchInstance < NumPinMuxes;
- SearchInstance++)
- {
- if (!pPinMuxes[SearchInstance])
- continue;
-
-#ifdef CONFIG_NVEC
- /* nvec uses instance 0 as I2C slave */
- if (SearchModule == NvOdmIoModule_I2c &&
- SearchInstance == 0)
- {
- continue;
- }
-#endif
- if (SearchModule==Module && SearchInstance==Instance)
- {
- if (PinMuxConfig &&
- pPinMuxes[Instance]!=NvOdmI2cPinMap_Multiplexed)
- return -1;
-
- if (pPinMuxes[Instance]==NvOdmI2cPinMap_Multiplexed &&
- !PinMuxConfig)
- return -1;
-
- if (PinMuxConfig)
- return cnt + (PinMuxConfig - NvOdmI2cPinMap_Config1);
-
- return cnt;
- }
-
- if (pPinMuxes[SearchInstance]==NvOdmI2cPinMap_Multiplexed)
- cnt += (int)NvOdmI2cPinMap_Config4;
- else
- cnt++;
- }
-
- }
- return -1;
-}
-
static void __init tegra_register_i2c(void)
{
NvU32 Num, Cnt;
diff --git a/arch/arm/mach-tegra/nvrpc_user.c b/arch/arm/mach-tegra/nvrpc_user.c
index 0989eff4dcb6..6a727509d217 100755
--- a/arch/arm/mach-tegra/nvrpc_user.c
+++ b/arch/arm/mach-tegra/nvrpc_user.c
@@ -38,7 +38,7 @@
((size) > sizeof((stackbuf)) ? kzalloc((size),(gfp)) : (stackbuf))
#define nvrpc_stack_kfree(stackbuf, buf) \
do { \
- if ((buf) && (buf)!=(stackbuf)) \
+ if ((buf) && (buf)!=(void *)(stackbuf)) \
kfree(buf); \
} while (0);
diff --git a/drivers/input/keyboard/tegra-nvec.c b/drivers/input/keyboard/tegra-nvec.c
index 09022289a219..9572a7fd9f03 100644
--- a/drivers/input/keyboard/tegra-nvec.c
+++ b/drivers/input/keyboard/tegra-nvec.c
@@ -393,7 +393,7 @@ fail:
return error;
}
-static int nvec_keyboard_remove(struct nvec_device *dev)
+static void nvec_keyboard_remove(struct nvec_device *dev)
{
struct input_dev *input_dev = nvec_get_drvdata(dev);
struct nvec_keyboard *keyboard = input_get_drvdata(input_dev);
@@ -405,8 +405,6 @@ static int nvec_keyboard_remove(struct nvec_device *dev)
keyboard->shutdown = 1;
input_free_device(input_dev);
kfree(keyboard);
-
- return 0;
}
static int nvec_keyboard_suspend(struct nvec_device *pdev, pm_message_t state)
diff --git a/drivers/input/misc/tegra_odm_scroll.c b/drivers/input/misc/tegra_odm_scroll.c
index 6d0022f9cea9..bbfbc8fed26d 100644
--- a/drivers/input/misc/tegra_odm_scroll.c
+++ b/drivers/input/misc/tegra_odm_scroll.c
@@ -44,7 +44,6 @@ static int scroll_thread(void *pdata)
/* FIXME add a terminating condition */
while(1) {
- NvU32 value = 0;
NvOdmOsSemaphoreWait(scroll->sem);
Events = NvOdmScrollWheelGetEvent(scroll->odm_dev);
diff --git a/sound/soc/tegra/tegra_transport.c b/sound/soc/tegra/tegra_transport.c
index 15a348edcc6a..05d930f130fb 100644
--- a/sound/soc/tegra/tegra_transport.c
+++ b/sound/soc/tegra/tegra_transport.c
@@ -649,8 +649,8 @@ void tegra_audiofx_destroyfx(struct tegra_audio_data *audio_context)
snd_printk(KERN_ERR "audiofx_create_object failed!"); \
}
-#define audiofx_path_connect(path_object, sink_object) \
- connection.hSource = path_object, \
+#define audiofx_path_connect(path_object, sink_object) \
+ connection.hSource = (NvAudioFxHandle)path_object, \
connection.SourcePin = NvAudioFxSourcePin; \
connection.SinkPin = NvAudioFxSinkPin; \
connection.hSink = (NvAudioFxHandle)sink_object; \
@@ -769,7 +769,7 @@ NvError tegra_audiofx_create_input(NvRmDeviceHandle hRmDevice,
audiofx_create_object(pInput->Convert,NvAudioFxConvertId);
/* Wire 1 */
- connection.hSource = pInput->Stream;
+ connection.hSource = (NvAudioFxHandle)(pInput->Stream);
connection.SourcePin = NvAudioFxSourcePin;
connection.hSink = (NvAudioFxHandle)pInput->Resize;
connection.SinkPin = NvAudioFxCopySinkPin;