[media] xc2028: silence compiler warnings
authorAntti Palosaari <crope@iki.fi>
Sat, 1 Feb 2014 00:55:47 +0000 (21:55 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 5 Mar 2014 18:35:25 +0000 (15:35 -0300)
There is now new tuner types which are not handled on that switch-case.
Print error if unknown tuner type is meet.

drivers/media/tuners/tuner-xc2028.c: In function ‘generic_set_freq’:
drivers/media/tuners/tuner-xc2028.c:1037:2: warning: enumeration value ‘V4L2_TUNER_ADC’ not handled in switch [-Wswitch]
  switch (new_type) {
  ^
drivers/media/tuners/tuner-xc2028.c:1037:2: warning: enumeration value ‘V4L2_TUNER_RF’ not handled in switch [-Wswitch]

Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/tuners/tuner-xc2028.c

index cca508d4aafb1545037b7972d06d01c346efeb77..76a816511f2f34f9bd9d5886d549c59e8b6b5d96 100644 (file)
@@ -1107,6 +1107,9 @@ static int generic_set_freq(struct dvb_frontend *fe, u32 freq /* in HZ */,
                                offset += 200000;
                }
 #endif
+       default:
+               tuner_err("Unsupported tuner type %d.\n", new_type);
+               break;
        }
 
        div = (freq - offset + DIV / 2) / DIV;