diff options
author | Joe Perches <joe@perches.com> | 2011-08-21 18:56:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-03 19:54:14 -0400 |
commit | 44d0b80e5ff741d502a6ccc8685a18bda1ac9da4 (patch) | |
tree | b19473bcfeae86f0ab4ccc66e5bf18fea71fc896 /drivers/media/dvb/ttpci | |
parent | 0b8bd83cf393832f1d00096b866d888b75b374c3 (diff) |
[media] saa7146: Use current logging styles
Standardize the mechanisms to emit logging messages.
A few other modules used an #include from saa7146,
convert those at the same time.
Add pr_fmt.
Convert printks to pr_<level>
Convert printks without KERN_<level> to appropriate pr_<level>.
Convert logging macros requiring multiple parentheses to normal style.
Removed embedded prefixes when pr_fmt was added.
Whitespace cleanups when around other conversions.
Use printf extension %pM to print mac address.
Coalesce format strings.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Michael Hunold <michael@mihu.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_v4l.c | 32 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-av.c | 42 |
2 files changed, 38 insertions, 36 deletions
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c index cdd31cae46c4..ee8ee1d481fa 100644 --- a/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/drivers/media/dvb/ttpci/av7110_v4l.c | |||
@@ -25,6 +25,8 @@ | |||
25 | * the project's page is at http://www.linuxtv.org/ | 25 | * the project's page is at http://www.linuxtv.org/ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
29 | |||
28 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
29 | #include <linux/types.h> | 31 | #include <linux/types.h> |
30 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
@@ -253,7 +255,7 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) | |||
253 | 255 | ||
254 | switch (av7110->current_input) { | 256 | switch (av7110->current_input) { |
255 | case 1: | 257 | case 1: |
256 | dprintk(1, "switching SAA7113 to Analog Tuner Input.\n"); | 258 | dprintk(1, "switching SAA7113 to Analog Tuner Input\n"); |
257 | msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source | 259 | msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source |
258 | msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source | 260 | msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source |
259 | msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source | 261 | msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source |
@@ -263,7 +265,7 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) | |||
263 | 265 | ||
264 | if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { | 266 | if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { |
265 | if (ves1820_writereg(dev, 0x09, 0x0f, 0x60)) | 267 | if (ves1820_writereg(dev, 0x09, 0x0f, 0x60)) |
266 | dprintk(1, "setting band in demodulator failed.\n"); | 268 | dprintk(1, "setting band in demodulator failed\n"); |
267 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { | 269 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { |
268 | saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9819 pin9(STD) | 270 | saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // TDA9819 pin9(STD) |
269 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9819 pin30(VIF) | 271 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTHI); // TDA9819 pin30(VIF) |
@@ -272,17 +274,17 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) | |||
272 | dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); | 274 | dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); |
273 | break; | 275 | break; |
274 | case 2: | 276 | case 2: |
275 | dprintk(1, "switching SAA7113 to Video AV CVBS Input.\n"); | 277 | dprintk(1, "switching SAA7113 to Video AV CVBS Input\n"); |
276 | if (i2c_writereg(av7110, 0x48, 0x02, 0xd2) != 1) | 278 | if (i2c_writereg(av7110, 0x48, 0x02, 0xd2) != 1) |
277 | dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); | 279 | dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); |
278 | break; | 280 | break; |
279 | case 3: | 281 | case 3: |
280 | dprintk(1, "switching SAA7113 to Video AV Y/C Input.\n"); | 282 | dprintk(1, "switching SAA7113 to Video AV Y/C Input\n"); |
281 | if (i2c_writereg(av7110, 0x48, 0x02, 0xd9) != 1) | 283 | if (i2c_writereg(av7110, 0x48, 0x02, 0xd9) != 1) |
282 | dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); | 284 | dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); |
283 | break; | 285 | break; |
284 | default: | 286 | default: |
285 | dprintk(1, "switching SAA7113 to Input: AV7110: SAA7113: invalid input.\n"); | 287 | dprintk(1, "switching SAA7113 to Input: AV7110: SAA7113: invalid input\n"); |
286 | } | 288 | } |
287 | } else { | 289 | } else { |
288 | adswitch = 0; | 290 | adswitch = 0; |
@@ -299,7 +301,7 @@ static int av7110_dvb_c_switch(struct saa7146_fh *fh) | |||
299 | 301 | ||
300 | if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { | 302 | if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { |
301 | if (ves1820_writereg(dev, 0x09, 0x0f, 0x20)) | 303 | if (ves1820_writereg(dev, 0x09, 0x0f, 0x20)) |
302 | dprintk(1, "setting band in demodulator failed.\n"); | 304 | dprintk(1, "setting band in demodulator failed\n"); |
303 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { | 305 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { |
304 | saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) | 306 | saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) |
305 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) | 307 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) |
@@ -413,7 +415,7 @@ static int vidioc_g_frequency(struct file *file, void *fh, struct v4l2_frequency | |||
413 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 415 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
414 | struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; | 416 | struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; |
415 | 417 | ||
416 | dprintk(2, "VIDIOC_G_FREQ: freq:0x%08x.\n", f->frequency); | 418 | dprintk(2, "VIDIOC_G_FREQ: freq:0x%08x\n", f->frequency); |
417 | 419 | ||
418 | if (!av7110->analog_tuner_flags || av7110->current_input != 1) | 420 | if (!av7110->analog_tuner_flags || av7110->current_input != 1) |
419 | return -EINVAL; | 421 | return -EINVAL; |
@@ -429,7 +431,7 @@ static int vidioc_s_frequency(struct file *file, void *fh, struct v4l2_frequency | |||
429 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 431 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
430 | struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; | 432 | struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; |
431 | 433 | ||
432 | dprintk(2, "VIDIOC_S_FREQUENCY: freq:0x%08x.\n", f->frequency); | 434 | dprintk(2, "VIDIOC_S_FREQUENCY: freq:0x%08x\n", f->frequency); |
433 | 435 | ||
434 | if (!av7110->analog_tuner_flags || av7110->current_input != 1) | 436 | if (!av7110->analog_tuner_flags || av7110->current_input != 1) |
435 | return -EINVAL; | 437 | return -EINVAL; |
@@ -689,12 +691,12 @@ int av7110_init_analog_module(struct av7110 *av7110) | |||
689 | 691 | ||
690 | if (i2c_writereg(av7110, 0x80, 0x0, 0x80) == 1 && | 692 | if (i2c_writereg(av7110, 0x80, 0x0, 0x80) == 1 && |
691 | i2c_writereg(av7110, 0x80, 0x0, 0) == 1) { | 693 | i2c_writereg(av7110, 0x80, 0x0, 0) == 1) { |
692 | printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3400\n", | 694 | pr_info("DVB-C analog module @ card %d detected, initializing MSP3400\n", |
693 | av7110->dvb_adapter.num); | 695 | av7110->dvb_adapter.num); |
694 | av7110->adac_type = DVB_ADAC_MSP34x0; | 696 | av7110->adac_type = DVB_ADAC_MSP34x0; |
695 | } else if (i2c_writereg(av7110, 0x84, 0x0, 0x80) == 1 && | 697 | } else if (i2c_writereg(av7110, 0x84, 0x0, 0x80) == 1 && |
696 | i2c_writereg(av7110, 0x84, 0x0, 0) == 1) { | 698 | i2c_writereg(av7110, 0x84, 0x0, 0) == 1) { |
697 | printk("dvb-ttpci: DVB-C analog module @ card %d detected, initializing MSP3415\n", | 699 | pr_info("DVB-C analog module @ card %d detected, initializing MSP3415\n", |
698 | av7110->dvb_adapter.num); | 700 | av7110->dvb_adapter.num); |
699 | av7110->adac_type = DVB_ADAC_MSP34x5; | 701 | av7110->adac_type = DVB_ADAC_MSP34x5; |
700 | } else | 702 | } else |
@@ -715,7 +717,7 @@ int av7110_init_analog_module(struct av7110 *av7110) | |||
715 | msp_writereg(av7110, MSP_WR_DSP, 0x000d, 0x1900); // prescale SCART | 717 | msp_writereg(av7110, MSP_WR_DSP, 0x000d, 0x1900); // prescale SCART |
716 | 718 | ||
717 | if (i2c_writereg(av7110, 0x48, 0x01, 0x00)!=1) { | 719 | if (i2c_writereg(av7110, 0x48, 0x01, 0x00)!=1) { |
718 | INFO(("saa7113 not accessible.\n")); | 720 | pr_info("saa7113 not accessible\n"); |
719 | } else { | 721 | } else { |
720 | u8 *i = saa7113_init_regs; | 722 | u8 *i = saa7113_init_regs; |
721 | 723 | ||
@@ -733,7 +735,7 @@ int av7110_init_analog_module(struct av7110 *av7110) | |||
733 | /* setup for DVB by default */ | 735 | /* setup for DVB by default */ |
734 | if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { | 736 | if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { |
735 | if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20)) | 737 | if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20)) |
736 | dprintk(1, "setting band in demodulator failed.\n"); | 738 | dprintk(1, "setting band in demodulator failed\n"); |
737 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { | 739 | } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { |
738 | saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) | 740 | saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) |
739 | saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) | 741 | saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) |
@@ -797,7 +799,7 @@ int av7110_init_v4l(struct av7110 *av7110) | |||
797 | ret = saa7146_vv_init(dev, vv_data); | 799 | ret = saa7146_vv_init(dev, vv_data); |
798 | 800 | ||
799 | if (ret) { | 801 | if (ret) { |
800 | ERR(("cannot init capture device. skipping.\n")); | 802 | ERR("cannot init capture device. skipping\n"); |
801 | return -ENODEV; | 803 | return -ENODEV; |
802 | } | 804 | } |
803 | vv_data->ops.vidioc_enum_input = vidioc_enum_input; | 805 | vv_data->ops.vidioc_enum_input = vidioc_enum_input; |
@@ -814,12 +816,12 @@ int av7110_init_v4l(struct av7110 *av7110) | |||
814 | vv_data->ops.vidioc_s_fmt_sliced_vbi_out = vidioc_s_fmt_sliced_vbi_out; | 816 | vv_data->ops.vidioc_s_fmt_sliced_vbi_out = vidioc_s_fmt_sliced_vbi_out; |
815 | 817 | ||
816 | if (saa7146_register_device(&av7110->v4l_dev, dev, "av7110", VFL_TYPE_GRABBER)) { | 818 | if (saa7146_register_device(&av7110->v4l_dev, dev, "av7110", VFL_TYPE_GRABBER)) { |
817 | ERR(("cannot register capture device. skipping.\n")); | 819 | ERR("cannot register capture device. skipping\n"); |
818 | saa7146_vv_release(dev); | 820 | saa7146_vv_release(dev); |
819 | return -ENODEV; | 821 | return -ENODEV; |
820 | } | 822 | } |
821 | if (saa7146_register_device(&av7110->vbi_dev, dev, "av7110", VFL_TYPE_VBI)) | 823 | if (saa7146_register_device(&av7110->vbi_dev, dev, "av7110", VFL_TYPE_VBI)) |
822 | ERR(("cannot register vbi v4l2 device. skipping.\n")); | 824 | ERR("cannot register vbi v4l2 device. skipping\n"); |
823 | return 0; | 825 | return 0; |
824 | } | 826 | } |
825 | 827 | ||
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 5b28bc6fbeb4..91b7d53d7b0e 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -33,6 +33,8 @@ | |||
33 | * the project's page is at http://www.linuxtv.org/ | 33 | * the project's page is at http://www.linuxtv.org/ |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
37 | |||
36 | #include "budget.h" | 38 | #include "budget.h" |
37 | #include "stv0299.h" | 39 | #include "stv0299.h" |
38 | #include "stb0899_drv.h" | 40 | #include "stb0899_drv.h" |
@@ -149,7 +151,7 @@ static int ciintf_read_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int ad | |||
149 | result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address & 0xfff, 1, 0, 1); | 151 | result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address & 0xfff, 1, 0, 1); |
150 | if (result == -ETIMEDOUT) { | 152 | if (result == -ETIMEDOUT) { |
151 | ciintf_slot_shutdown(ca, slot); | 153 | ciintf_slot_shutdown(ca, slot); |
152 | printk(KERN_INFO "budget-av: cam ejected 1\n"); | 154 | pr_info("cam ejected 1\n"); |
153 | } | 155 | } |
154 | return result; | 156 | return result; |
155 | } | 157 | } |
@@ -168,7 +170,7 @@ static int ciintf_write_attribute_mem(struct dvb_ca_en50221 *ca, int slot, int a | |||
168 | result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address & 0xfff, 1, value, 0, 1); | 170 | result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address & 0xfff, 1, value, 0, 1); |
169 | if (result == -ETIMEDOUT) { | 171 | if (result == -ETIMEDOUT) { |
170 | ciintf_slot_shutdown(ca, slot); | 172 | ciintf_slot_shutdown(ca, slot); |
171 | printk(KERN_INFO "budget-av: cam ejected 2\n"); | 173 | pr_info("cam ejected 2\n"); |
172 | } | 174 | } |
173 | return result; | 175 | return result; |
174 | } | 176 | } |
@@ -187,7 +189,7 @@ static int ciintf_read_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 addre | |||
187 | result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address & 3, 1, 0, 0); | 189 | result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, address & 3, 1, 0, 0); |
188 | if (result == -ETIMEDOUT) { | 190 | if (result == -ETIMEDOUT) { |
189 | ciintf_slot_shutdown(ca, slot); | 191 | ciintf_slot_shutdown(ca, slot); |
190 | printk(KERN_INFO "budget-av: cam ejected 3\n"); | 192 | pr_info("cam ejected 3\n"); |
191 | return -ETIMEDOUT; | 193 | return -ETIMEDOUT; |
192 | } | 194 | } |
193 | return result; | 195 | return result; |
@@ -207,7 +209,7 @@ static int ciintf_write_cam_control(struct dvb_ca_en50221 *ca, int slot, u8 addr | |||
207 | result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address & 3, 1, value, 0, 0); | 209 | result = ttpci_budget_debiwrite(&budget_av->budget, DEBICICAM, address & 3, 1, value, 0, 0); |
208 | if (result == -ETIMEDOUT) { | 210 | if (result == -ETIMEDOUT) { |
209 | ciintf_slot_shutdown(ca, slot); | 211 | ciintf_slot_shutdown(ca, slot); |
210 | printk(KERN_INFO "budget-av: cam ejected 5\n"); | 212 | pr_info("cam ejected 5\n"); |
211 | } | 213 | } |
212 | return result; | 214 | return result; |
213 | } | 215 | } |
@@ -289,7 +291,7 @@ static int ciintf_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open | |||
289 | if (saa7146_read(saa, PSR) & MASK_06) { | 291 | if (saa7146_read(saa, PSR) & MASK_06) { |
290 | if (budget_av->slot_status == SLOTSTATUS_NONE) { | 292 | if (budget_av->slot_status == SLOTSTATUS_NONE) { |
291 | budget_av->slot_status = SLOTSTATUS_PRESENT; | 293 | budget_av->slot_status = SLOTSTATUS_PRESENT; |
292 | printk(KERN_INFO "budget-av: cam inserted A\n"); | 294 | pr_info("cam inserted A\n"); |
293 | } | 295 | } |
294 | } | 296 | } |
295 | saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTLO); | 297 | saa7146_setgpio(saa, 3, SAA7146_GPIO_OUTLO); |
@@ -306,11 +308,11 @@ static int ciintf_poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open | |||
306 | result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, 0, 1, 0, 1); | 308 | result = ttpci_budget_debiread(&budget_av->budget, DEBICICAM, 0, 1, 0, 1); |
307 | if ((result >= 0) && (budget_av->slot_status == SLOTSTATUS_NONE)) { | 309 | if ((result >= 0) && (budget_av->slot_status == SLOTSTATUS_NONE)) { |
308 | budget_av->slot_status = SLOTSTATUS_PRESENT; | 310 | budget_av->slot_status = SLOTSTATUS_PRESENT; |
309 | printk(KERN_INFO "budget-av: cam inserted B\n"); | 311 | pr_info("cam inserted B\n"); |
310 | } else if (result < 0) { | 312 | } else if (result < 0) { |
311 | if (budget_av->slot_status != SLOTSTATUS_NONE) { | 313 | if (budget_av->slot_status != SLOTSTATUS_NONE) { |
312 | ciintf_slot_shutdown(ca, slot); | 314 | ciintf_slot_shutdown(ca, slot); |
313 | printk(KERN_INFO "budget-av: cam ejected 5\n"); | 315 | pr_info("cam ejected 5\n"); |
314 | return 0; | 316 | return 0; |
315 | } | 317 | } |
316 | } | 318 | } |
@@ -365,11 +367,11 @@ static int ciintf_init(struct budget_av *budget_av) | |||
365 | 367 | ||
366 | if ((result = dvb_ca_en50221_init(&budget_av->budget.dvb_adapter, | 368 | if ((result = dvb_ca_en50221_init(&budget_av->budget.dvb_adapter, |
367 | &budget_av->ca, 0, 1)) != 0) { | 369 | &budget_av->ca, 0, 1)) != 0) { |
368 | printk(KERN_ERR "budget-av: ci initialisation failed.\n"); | 370 | pr_err("ci initialisation failed\n"); |
369 | goto error; | 371 | goto error; |
370 | } | 372 | } |
371 | 373 | ||
372 | printk(KERN_INFO "budget-av: ci interface initialised.\n"); | 374 | pr_info("ci interface initialised\n"); |
373 | return 0; | 375 | return 0; |
374 | 376 | ||
375 | error: | 377 | error: |
@@ -1345,8 +1347,7 @@ static void frontend_init(struct budget_av *budget_av) | |||
1345 | } | 1347 | } |
1346 | 1348 | ||
1347 | if (fe == NULL) { | 1349 | if (fe == NULL) { |
1348 | printk(KERN_ERR "budget-av: A frontend driver was not found " | 1350 | pr_err("A frontend driver was not found for device [%04x:%04x] subsystem [%04x:%04x]\n", |
1349 | "for device [%04x:%04x] subsystem [%04x:%04x]\n", | ||
1350 | saa->pci->vendor, | 1351 | saa->pci->vendor, |
1351 | saa->pci->device, | 1352 | saa->pci->device, |
1352 | saa->pci->subsystem_vendor, | 1353 | saa->pci->subsystem_vendor, |
@@ -1358,7 +1359,7 @@ static void frontend_init(struct budget_av *budget_av) | |||
1358 | 1359 | ||
1359 | if (dvb_register_frontend(&budget_av->budget.dvb_adapter, | 1360 | if (dvb_register_frontend(&budget_av->budget.dvb_adapter, |
1360 | budget_av->budget.dvb_frontend)) { | 1361 | budget_av->budget.dvb_frontend)) { |
1361 | printk(KERN_ERR "budget-av: Frontend registration failed!\n"); | 1362 | pr_err("Frontend registration failed!\n"); |
1362 | dvb_frontend_detach(budget_av->budget.dvb_frontend); | 1363 | dvb_frontend_detach(budget_av->budget.dvb_frontend); |
1363 | budget_av->budget.dvb_frontend = NULL; | 1364 | budget_av->budget.dvb_frontend = NULL; |
1364 | } | 1365 | } |
@@ -1416,7 +1417,7 @@ static struct v4l2_input knc1_inputs[KNC1_INPUTS] = { | |||
1416 | 1417 | ||
1417 | static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i) | 1418 | static int vidioc_enum_input(struct file *file, void *fh, struct v4l2_input *i) |
1418 | { | 1419 | { |
1419 | dprintk(1, "VIDIOC_ENUMINPUT %d.\n", i->index); | 1420 | dprintk(1, "VIDIOC_ENUMINPUT %d\n", i->index); |
1420 | if (i->index >= KNC1_INPUTS) | 1421 | if (i->index >= KNC1_INPUTS) |
1421 | return -EINVAL; | 1422 | return -EINVAL; |
1422 | memcpy(i, &knc1_inputs[i->index], sizeof(struct v4l2_input)); | 1423 | memcpy(i, &knc1_inputs[i->index], sizeof(struct v4l2_input)); |
@@ -1430,7 +1431,7 @@ static int vidioc_g_input(struct file *file, void *fh, unsigned int *i) | |||
1430 | 1431 | ||
1431 | *i = budget_av->cur_input; | 1432 | *i = budget_av->cur_input; |
1432 | 1433 | ||
1433 | dprintk(1, "VIDIOC_G_INPUT %d.\n", *i); | 1434 | dprintk(1, "VIDIOC_G_INPUT %d\n", *i); |
1434 | return 0; | 1435 | return 0; |
1435 | } | 1436 | } |
1436 | 1437 | ||
@@ -1439,7 +1440,7 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input) | |||
1439 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 1440 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
1440 | struct budget_av *budget_av = (struct budget_av *)dev->ext_priv; | 1441 | struct budget_av *budget_av = (struct budget_av *)dev->ext_priv; |
1441 | 1442 | ||
1442 | dprintk(1, "VIDIOC_S_INPUT %d.\n", input); | 1443 | dprintk(1, "VIDIOC_S_INPUT %d\n", input); |
1443 | return saa7113_setinput(budget_av, input); | 1444 | return saa7113_setinput(budget_av, input); |
1444 | } | 1445 | } |
1445 | 1446 | ||
@@ -1478,7 +1479,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
1478 | 1479 | ||
1479 | if (0 != saa7146_vv_init(dev, &vv_data)) { | 1480 | if (0 != saa7146_vv_init(dev, &vv_data)) { |
1480 | /* fixme: proper cleanup here */ | 1481 | /* fixme: proper cleanup here */ |
1481 | ERR(("cannot init vv subsystem.\n")); | 1482 | ERR("cannot init vv subsystem\n"); |
1482 | return err; | 1483 | return err; |
1483 | } | 1484 | } |
1484 | vv_data.ops.vidioc_enum_input = vidioc_enum_input; | 1485 | vv_data.ops.vidioc_enum_input = vidioc_enum_input; |
@@ -1487,7 +1488,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
1487 | 1488 | ||
1488 | if ((err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_GRABBER))) { | 1489 | if ((err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_GRABBER))) { |
1489 | /* fixme: proper cleanup here */ | 1490 | /* fixme: proper cleanup here */ |
1490 | ERR(("cannot register capture v4l2 device.\n")); | 1491 | ERR("cannot register capture v4l2 device\n"); |
1491 | saa7146_vv_release(dev); | 1492 | saa7146_vv_release(dev); |
1492 | return err; | 1493 | return err; |
1493 | } | 1494 | } |
@@ -1504,13 +1505,12 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio | |||
1504 | 1505 | ||
1505 | mac = budget_av->budget.dvb_adapter.proposed_mac; | 1506 | mac = budget_av->budget.dvb_adapter.proposed_mac; |
1506 | if (i2c_readregs(&budget_av->budget.i2c_adap, 0xa0, 0x30, mac, 6)) { | 1507 | if (i2c_readregs(&budget_av->budget.i2c_adap, 0xa0, 0x30, mac, 6)) { |
1507 | printk(KERN_ERR "KNC1-%d: Could not read MAC from KNC1 card\n", | 1508 | pr_err("KNC1-%d: Could not read MAC from KNC1 card\n", |
1508 | budget_av->budget.dvb_adapter.num); | 1509 | budget_av->budget.dvb_adapter.num); |
1509 | memset(mac, 0, 6); | 1510 | memset(mac, 0, 6); |
1510 | } else { | 1511 | } else { |
1511 | printk(KERN_INFO "KNC1-%d: MAC addr = %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", | 1512 | pr_info("KNC1-%d: MAC addr = %pM\n", |
1512 | budget_av->budget.dvb_adapter.num, | 1513 | budget_av->budget.dvb_adapter.num, mac); |
1513 | mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); | ||
1514 | } | 1514 | } |
1515 | 1515 | ||
1516 | budget_av->budget.dvb_adapter.priv = budget_av; | 1516 | budget_av->budget.dvb_adapter.priv = budget_av; |