diff options
author | Sachin Nikam <snikam@nvidia.com> | 2010-06-01 12:52:42 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-06-02 08:52:11 -0700 |
commit | 38a9d99c28da41805ebde7f85f4c0d377684da4e (patch) | |
tree | 5df7c40f064cd7f19ba325f26a5ee48afbbbac70 | |
parent | 1f40fc9c48aeeb57b2c6e98a068f6dbeeeb5ee8f (diff) |
kernel:Fixing Kernel Compilation warnings.
Warnings like:
assignment from incompatible poiner type
initialization from incompatible poiner type
Bug 682070
Change-Id: Ia79b13a5a46ca884d333a971cff167da8cd89c40
Reviewed-on: http://git-master/r/1903
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r-- | drivers/mtd/devices/tegra_mtd_nand.c | 41 | ||||
-rw-r--r-- | drivers/video/tegra-fb.c | 2 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_transport.c | 4 |
3 files changed, 40 insertions, 7 deletions
diff --git a/drivers/mtd/devices/tegra_mtd_nand.c b/drivers/mtd/devices/tegra_mtd_nand.c index e10d3030cedd..2a01f08db3a8 100644 --- a/drivers/mtd/devices/tegra_mtd_nand.c +++ b/drivers/mtd/devices/tegra_mtd_nand.c @@ -667,7 +667,7 @@ static int tegra_nand_write_oob(struct mtd_info *mtd, loff_t to, return do_write_oob(mtd, to, ops); } -static int tegra_nand_suspend(struct mtd_info *mtd) +static int tegra_nand_suspend(struct platform_device *platDev, pm_message_t state) { NvError Err; @@ -684,7 +684,7 @@ static int tegra_nand_suspend(struct mtd_info *mtd) return 0; } -static int tegra_nand_resume(struct mtd_info *mtd) +static int tegra_nand_resume(struct platform_device *platDev) { NvError Err; @@ -701,6 +701,39 @@ static int tegra_nand_resume(struct mtd_info *mtd) return 0; } +static int tegra_mtd_suspend(struct mtd_info *mtd) +{ + NvError Err; + + /* Call ddk suspend API */ + if (!s_hNand) { + NvOsDebugPrintf("\n Nand: Ddk handle NULL in suspend "); + return -1; + } + Err = NvDdkNandSuspend(s_hNand); + if (Err != NvSuccess) { + NvOsDebugPrintf("\n Nand Ddk Suspend error=0x%x ", Err); + return -1; + } + return 0; +} + +static void tegra_mtd_resume(struct mtd_info *mtd) +{ + NvError Err; + + /* call Ddk resume code */ + if (!s_hNand) { + NvOsDebugPrintf("\n Nand: Ddk handle NULL in resume "); + } + else { + Err = NvDdkNandResume(s_hNand); + if (Err != NvSuccess) { + NvOsDebugPrintf("\n Nand Ddk Resume error=0x%x ", Err); + } + } +} + static int scan_bad_blocks(struct tegra_nand_info *info) { struct mtd_info *mtd = &info->mtd; @@ -821,8 +854,8 @@ static int tegra_nand_scan(struct mtd_info *mtd) mtd->read_oob = tegra_nand_read_oob; mtd->write_oob = tegra_nand_write_oob; - mtd->resume = tegra_nand_resume; - mtd->suspend = tegra_nand_suspend; + mtd->resume = tegra_mtd_resume; + mtd->suspend = tegra_mtd_suspend; mtd->block_isbad = tegra_nand_block_isbad; mtd->block_markbad = tegra_nand_block_markbad; NvDdkNandSuspendClocks(s_hNand); diff --git a/drivers/video/tegra-fb.c b/drivers/video/tegra-fb.c index fa18ad494c79..c6c82c45df5c 100644 --- a/drivers/video/tegra-fb.c +++ b/drivers/video/tegra-fb.c @@ -176,7 +176,7 @@ static NvBool tegra_fb_power_register( void ) return NV_TRUE; } - if( NvRmPowerRegister( s_hRmGlobal, 0, &s_power_id ) != NvSuccess ) + if( NvRmPowerRegister( s_hRmGlobal, 0, (NvU32 *)&s_power_id ) != NvSuccess ) { printk( "nvtegrafb: unable to load power manager\n" ); return NV_FALSE; diff --git a/sound/soc/tegra/tegra_transport.c b/sound/soc/tegra/tegra_transport.c index 05d930f130fb..84de440dc131 100644 --- a/sound/soc/tegra/tegra_transport.c +++ b/sound/soc/tegra/tegra_transport.c @@ -40,7 +40,7 @@ static AlsaTransport* atrans = 0; -static NvAudioFxMixerHandle tegra_transport_mixer_open() +static NvAudioFxMixerHandle tegra_transport_mixer_open(void) { NvError status = NvSuccess; NvAudioFxMixerHandle hMixer = 0; @@ -687,7 +687,7 @@ NvError tegra_audiofx_create_output(NvRmDeviceHandle hRmDevice, audiofx_path_connect(pPath->Convert, pPath->Resize); audiofx_path_connect(pPath->Resize, pPath->Volume); - connection.hSource = pPath->Volume; + connection.hSource = (NvAudioFxHandle)(pPath->Volume); connection.SourcePin = NvAudioFxSourcePin; connection.hSink = 0; connection.SinkPin = NvAudioFxSinkPin; |