V4L/DVB (13380): sms-cards: make id unsigned in sms_get_board()
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 17 Nov 2009 22:43:40 +0000 (19:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:41:36 +0000 (18:41 -0200)
Make id signed so we can't get an invalid pointer when we pass a negative
id.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/siano/sms-cards.c
drivers/media/dvb/siano/sms-cards.h

index e216389..1067b22 100644 (file)
@@ -97,7 +97,7 @@ static struct sms_board sms_boards[] = {
        },
 };
 
-struct sms_board *sms_get_board(int id)
+struct sms_board *sms_get_board(unsigned id)
 {
        BUG_ON(id >= ARRAY_SIZE(sms_boards));
 
index 38f062f..8f19fc0 100644 (file)
@@ -81,7 +81,7 @@ struct sms_board {
        int led_power, led_hi, led_lo, lna_ctrl, rf_switch;
 };
 
-struct sms_board *sms_get_board(int id);
+struct sms_board *sms_get_board(unsigned id);
 
 extern struct smscore_device_t *coredev;