Commit 6c629edc authored by YAMANE Toshiaki's avatar YAMANE Toshiaki Committed by Mauro Carvalho Chehab

[media] staging/media: Use dev_ printks in go7007/wis-sony-tuner.c

fixed below checkpatch warning.
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6d569502
...@@ -95,8 +95,8 @@ static int set_freq(struct i2c_client *client, int freq) ...@@ -95,8 +95,8 @@ static int set_freq(struct i2c_client *client, int freq)
band_name = "UHF"; band_name = "UHF";
band_select = tun->UHF; band_select = tun->UHF;
} }
printk(KERN_DEBUG "wis-sony-tuner: tuning to frequency %d.%04d (%s)\n", dev_dbg(&client->dev, "tuning to frequency %d.%04d (%s)\n",
freq / 16, (freq % 16) * 625, band_name); freq / 16, (freq % 16) * 625, band_name);
n = freq + tun->IFPCoff; n = freq + tun->IFPCoff;
buffer[0] = n >> 8; buffer[0] = n >> 8;
...@@ -288,16 +288,16 @@ static int mpx_setup(struct i2c_client *client) ...@@ -288,16 +288,16 @@ static int mpx_setup(struct i2c_client *client)
u8 buf1[3], buf2[2]; u8 buf1[3], buf2[2];
struct i2c_msg msgs[2]; struct i2c_msg msgs[2];
printk(KERN_DEBUG "wis-sony-tuner: MPX registers: %04x %04x " dev_dbg(&client->dev,
"%04x %04x %04x %04x %04x %04x\n", "MPX registers: %04x %04x %04x %04x %04x %04x %04x %04x\n",
mpx_audio_modes[t->mpxmode].modus, mpx_audio_modes[t->mpxmode].modus,
source, source,
mpx_audio_modes[t->mpxmode].acb, mpx_audio_modes[t->mpxmode].acb,
mpx_audio_modes[t->mpxmode].fm_prescale, mpx_audio_modes[t->mpxmode].fm_prescale,
mpx_audio_modes[t->mpxmode].nicam_prescale, mpx_audio_modes[t->mpxmode].nicam_prescale,
mpx_audio_modes[t->mpxmode].scart_prescale, mpx_audio_modes[t->mpxmode].scart_prescale,
mpx_audio_modes[t->mpxmode].system, mpx_audio_modes[t->mpxmode].system,
mpx_audio_modes[t->mpxmode].volume); mpx_audio_modes[t->mpxmode].volume);
buf1[0] = 0x11; buf1[0] = 0x11;
buf1[1] = 0x00; buf1[1] = 0x00;
buf1[2] = 0x7e; buf1[2] = 0x7e;
...@@ -310,14 +310,14 @@ static int mpx_setup(struct i2c_client *client) ...@@ -310,14 +310,14 @@ static int mpx_setup(struct i2c_client *client)
msgs[1].len = 2; msgs[1].len = 2;
msgs[1].buf = buf2; msgs[1].buf = buf2;
i2c_transfer(client->adapter, msgs, 2); i2c_transfer(client->adapter, msgs, 2);
printk(KERN_DEBUG "wis-sony-tuner: MPX system: %02x%02x\n", dev_dbg(&client->dev, "MPX system: %02x%02x\n",
buf2[0], buf2[1]); buf2[0], buf2[1]);
buf1[0] = 0x11; buf1[0] = 0x11;
buf1[1] = 0x02; buf1[1] = 0x02;
buf1[2] = 0x00; buf1[2] = 0x00;
i2c_transfer(client->adapter, msgs, 2); i2c_transfer(client->adapter, msgs, 2);
printk(KERN_DEBUG "wis-sony-tuner: MPX status: %02x%02x\n", dev_dbg(&client->dev, "MPX status: %02x%02x\n",
buf2[0], buf2[1]); buf2[0], buf2[1]);
} }
#endif #endif
return 0; return 0;
...@@ -375,8 +375,7 @@ static int set_if(struct i2c_client *client) ...@@ -375,8 +375,7 @@ static int set_if(struct i2c_client *client)
t->mpxmode = force_mpx_mode; t->mpxmode = force_mpx_mode;
else else
t->mpxmode = default_mpx_mode; t->mpxmode = default_mpx_mode;
printk(KERN_DEBUG "wis-sony-tuner: setting MPX to mode %d\n", dev_dbg(&client->dev, "setting MPX to mode %d\n", t->mpxmode);
t->mpxmode);
mpx_setup(client); mpx_setup(client);
return 0; return 0;
...@@ -401,8 +400,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -401,8 +400,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
if (t->type >= 0) { if (t->type >= 0) {
if (t->type != *type) if (t->type != *type)
printk(KERN_ERR "wis-sony-tuner: type already " dev_err(&client->dev,
"set to %d, ignoring request for %d\n", "type already set to %d, ignoring request for %d\n",
t->type, *type); t->type, *type);
break; break;
} }
...@@ -414,28 +413,28 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -414,28 +413,28 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
case 'B': case 'B':
case 'g': case 'g':
case 'G': case 'G':
printk(KERN_INFO "wis-sony-tuner: forcing " dev_info(&client->dev,
"tuner to PAL-B/G bands\n"); "forcing tuner to PAL-B/G bands\n");
force_band = V4L2_STD_PAL_BG; force_band = V4L2_STD_PAL_BG;
break; break;
case 'i': case 'i':
case 'I': case 'I':
printk(KERN_INFO "wis-sony-tuner: forcing " dev_info(&client->dev,
"tuner to PAL-I band\n"); "forcing tuner to PAL-I band\n");
force_band = V4L2_STD_PAL_I; force_band = V4L2_STD_PAL_I;
break; break;
case 'd': case 'd':
case 'D': case 'D':
case 'k': case 'k':
case 'K': case 'K':
printk(KERN_INFO "wis-sony-tuner: forcing " dev_info(&client->dev,
"tuner to PAL-D/K bands\n"); "forcing tuner to PAL-D/K bands\n");
force_band = V4L2_STD_PAL_I; force_band = V4L2_STD_PAL_I;
break; break;
case 'l': case 'l':
case 'L': case 'L':
printk(KERN_INFO "wis-sony-tuner: forcing " dev_info(&client->dev,
"tuner to SECAM-L band\n"); "forcing tuner to SECAM-L band\n");
force_band = V4L2_STD_SECAM_L; force_band = V4L2_STD_SECAM_L;
break; break;
default: default:
...@@ -455,14 +454,15 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -455,14 +454,15 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
t->std = V4L2_STD_NTSC_M; t->std = V4L2_STD_NTSC_M;
break; break;
default: default:
printk(KERN_ERR "wis-sony-tuner: tuner type %d is not " dev_err(&client->dev,
"supported by this module\n", *type); "tuner type %d is not supported by this module\n",
*type);
break; break;
} }
if (type >= 0) if (type >= 0)
printk(KERN_INFO dev_info(&clinet->dev,
"wis-sony-tuner: type set to %d (%s)\n", "type set to %d (%s)\n",
t->type, sony_tuners[t->type - 200].name); t->type, sony_tuners[t->type - 200].name);
break; break;
} }
#endif #endif
...@@ -544,9 +544,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -544,9 +544,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
if (force_band && (*std & force_band) != *std && if (force_band && (*std & force_band) != *std &&
*std != V4L2_STD_PAL && *std != V4L2_STD_PAL &&
*std != V4L2_STD_SECAM) { *std != V4L2_STD_SECAM) {
printk(KERN_DEBUG "wis-sony-tuner: ignoring " dev_dbg(&client->dev,
"requested TV standard in " "ignoring requested TV standard in favor of force_band value\n");
"favor of force_band value\n");
t->std = force_band; t->std = force_band;
} else if (*std & V4L2_STD_PAL_BG) { /* default */ } else if (*std & V4L2_STD_PAL_BG) { /* default */
t->std = V4L2_STD_PAL_BG; t->std = V4L2_STD_PAL_BG;
...@@ -557,8 +556,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -557,8 +556,8 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
} else if (*std & V4L2_STD_SECAM_L) { } else if (*std & V4L2_STD_SECAM_L) {
t->std = V4L2_STD_SECAM_L; t->std = V4L2_STD_SECAM_L;
} else { } else {
printk(KERN_ERR "wis-sony-tuner: TV standard " dev_err(&client->dev,
"not supported\n"); "TV standard not supported\n");
*std = 0; /* hack to indicate EINVAL */ *std = 0; /* hack to indicate EINVAL */
break; break;
} }
...@@ -567,15 +566,15 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) ...@@ -567,15 +566,15 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
break; break;
case TUNER_SONY_BTF_PK467Z: case TUNER_SONY_BTF_PK467Z:
if (!(*std & V4L2_STD_NTSC_M_JP)) { if (!(*std & V4L2_STD_NTSC_M_JP)) {
printk(KERN_ERR "wis-sony-tuner: TV standard " dev_err(&client->dev,
"not supported\n"); "TV standard not supported\n");
*std = 0; /* hack to indicate EINVAL */ *std = 0; /* hack to indicate EINVAL */
} }
break; break;
case TUNER_SONY_BTF_PB463Z: case TUNER_SONY_BTF_PB463Z:
if (!(*std & V4L2_STD_NTSC_M)) { if (!(*std & V4L2_STD_NTSC_M)) {
printk(KERN_ERR "wis-sony-tuner: TV standard " dev_err(&client->dev,
"not supported\n"); "TV standard not supported\n");
*std = 0; /* hack to indicate EINVAL */ *std = 0; /* hack to indicate EINVAL */
} }
break; break;
...@@ -673,8 +672,7 @@ static int wis_sony_tuner_probe(struct i2c_client *client, ...@@ -673,8 +672,7 @@ static int wis_sony_tuner_probe(struct i2c_client *client,
t->audmode = V4L2_TUNER_MODE_STEREO; t->audmode = V4L2_TUNER_MODE_STEREO;
i2c_set_clientdata(client, t); i2c_set_clientdata(client, t);
printk(KERN_DEBUG dev_dbg(&client->dev, "initializing tuner at address %d on %s\n",
"wis-sony-tuner: initializing tuner at address %d on %s\n",
client->addr, adapter->name); client->addr, adapter->name);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment