aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx25840/cx25840-audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-audio.c')
-rw-r--r--drivers/media/video/cx25840/cx25840-audio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/cx25840/cx25840-audio.c b/drivers/media/video/cx25840/cx25840-audio.c
index d6421e1e8f6a..d199d80ea0a3 100644
--- a/drivers/media/video/cx25840/cx25840-audio.c
+++ b/drivers/media/video/cx25840/cx25840-audio.c
@@ -25,7 +25,7 @@
25 25
26static int set_audclk_freq(struct i2c_client *client, u32 freq) 26static int set_audclk_freq(struct i2c_client *client, u32 freq)
27{ 27{
28 struct cx25840_state *state = i2c_get_clientdata(client); 28 struct cx25840_state *state = to_state(i2c_get_clientdata(client));
29 29
30 if (freq != 32000 && freq != 44100 && freq != 48000) 30 if (freq != 32000 && freq != 44100 && freq != 48000)
31 return -EINVAL; 31 return -EINVAL;
@@ -193,7 +193,7 @@ static int set_audclk_freq(struct i2c_client *client, u32 freq)
193 193
194void cx25840_audio_set_path(struct i2c_client *client) 194void cx25840_audio_set_path(struct i2c_client *client)
195{ 195{
196 struct cx25840_state *state = i2c_get_clientdata(client); 196 struct cx25840_state *state = to_state(i2c_get_clientdata(client));
197 197
198 /* assert soft reset */ 198 /* assert soft reset */
199 cx25840_and_or(client, 0x810, ~0x1, 0x01); 199 cx25840_and_or(client, 0x810, ~0x1, 0x01);
@@ -235,7 +235,7 @@ void cx25840_audio_set_path(struct i2c_client *client)
235 235
236static int get_volume(struct i2c_client *client) 236static int get_volume(struct i2c_client *client)
237{ 237{
238 struct cx25840_state *state = i2c_get_clientdata(client); 238 struct cx25840_state *state = to_state(i2c_get_clientdata(client));
239 int vol; 239 int vol;
240 240
241 if (state->unmute_volume >= 0) 241 if (state->unmute_volume >= 0)
@@ -252,7 +252,7 @@ static int get_volume(struct i2c_client *client)
252 252
253static void set_volume(struct i2c_client *client, int volume) 253static void set_volume(struct i2c_client *client, int volume)
254{ 254{
255 struct cx25840_state *state = i2c_get_clientdata(client); 255 struct cx25840_state *state = to_state(i2c_get_clientdata(client));
256 int vol; 256 int vol;
257 257
258 if (state->unmute_volume >= 0) { 258 if (state->unmute_volume >= 0) {
@@ -340,14 +340,14 @@ static void set_balance(struct i2c_client *client, int balance)
340 340
341static int get_mute(struct i2c_client *client) 341static int get_mute(struct i2c_client *client)
342{ 342{
343 struct cx25840_state *state = i2c_get_clientdata(client); 343 struct cx25840_state *state = to_state(i2c_get_clientdata(client));
344 344
345 return state->unmute_volume >= 0; 345 return state->unmute_volume >= 0;
346} 346}
347 347
348static void set_mute(struct i2c_client *client, int mute) 348static void set_mute(struct i2c_client *client, int mute)
349{ 349{
350 struct cx25840_state *state = i2c_get_clientdata(client); 350 struct cx25840_state *state = to_state(i2c_get_clientdata(client));
351 351
352 if (mute && state->unmute_volume == -1) { 352 if (mute && state->unmute_volume == -1) {
353 int vol = get_volume(client); 353 int vol = get_volume(client);
@@ -365,7 +365,7 @@ static void set_mute(struct i2c_client *client, int mute)
365 365
366int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg) 366int cx25840_audio(struct i2c_client *client, unsigned int cmd, void *arg)
367{ 367{
368 struct cx25840_state *state = i2c_get_clientdata(client); 368 struct cx25840_state *state = to_state(i2c_get_clientdata(client));
369 struct v4l2_control *ctrl = arg; 369 struct v4l2_control *ctrl = arg;
370 int retval; 370 int retval;
371 371