mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 15:10:38 +00:00
ASoC: omap: mcbsp: Use uniform st_data pointer initialization
In this way we can save few lines, and have uniform way of initializing the st_data in all functions. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
This commit is contained in:
parent
b8fb4907a7
commit
e2002ab35f
@ -273,11 +273,9 @@ static void omap_st_chgain(struct omap_mcbsp *mcbsp)
|
|||||||
|
|
||||||
int omap_st_set_chgain(struct omap_mcbsp *mcbsp, int channel, s16 chgain)
|
int omap_st_set_chgain(struct omap_mcbsp *mcbsp, int channel, s16 chgain)
|
||||||
{
|
{
|
||||||
struct omap_mcbsp_st_data *st_data;
|
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
st_data = mcbsp->st_data;
|
|
||||||
|
|
||||||
if (!st_data)
|
if (!st_data)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
@ -298,11 +296,9 @@ int omap_st_set_chgain(struct omap_mcbsp *mcbsp, int channel, s16 chgain)
|
|||||||
|
|
||||||
int omap_st_get_chgain(struct omap_mcbsp *mcbsp, int channel, s16 *chgain)
|
int omap_st_get_chgain(struct omap_mcbsp *mcbsp, int channel, s16 *chgain)
|
||||||
{
|
{
|
||||||
struct omap_mcbsp_st_data *st_data;
|
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
st_data = mcbsp->st_data;
|
|
||||||
|
|
||||||
if (!st_data)
|
if (!st_data)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
@ -337,9 +333,7 @@ static int omap_st_start(struct omap_mcbsp *mcbsp)
|
|||||||
|
|
||||||
int omap_st_enable(struct omap_mcbsp *mcbsp)
|
int omap_st_enable(struct omap_mcbsp *mcbsp)
|
||||||
{
|
{
|
||||||
struct omap_mcbsp_st_data *st_data;
|
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
|
||||||
|
|
||||||
st_data = mcbsp->st_data;
|
|
||||||
|
|
||||||
if (!st_data)
|
if (!st_data)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
@ -368,11 +362,9 @@ static int omap_st_stop(struct omap_mcbsp *mcbsp)
|
|||||||
|
|
||||||
int omap_st_disable(struct omap_mcbsp *mcbsp)
|
int omap_st_disable(struct omap_mcbsp *mcbsp)
|
||||||
{
|
{
|
||||||
struct omap_mcbsp_st_data *st_data;
|
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
st_data = mcbsp->st_data;
|
|
||||||
|
|
||||||
if (!st_data)
|
if (!st_data)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
@ -386,14 +378,11 @@ int omap_st_disable(struct omap_mcbsp *mcbsp)
|
|||||||
|
|
||||||
int omap_st_is_enabled(struct omap_mcbsp *mcbsp)
|
int omap_st_is_enabled(struct omap_mcbsp *mcbsp)
|
||||||
{
|
{
|
||||||
struct omap_mcbsp_st_data *st_data;
|
struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
|
||||||
|
|
||||||
st_data = mcbsp->st_data;
|
|
||||||
|
|
||||||
if (!st_data)
|
if (!st_data)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
|
|
||||||
return st_data->enabled;
|
return st_data->enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user