lkml.org 
[lkml]   [2011]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 5/9] media/radio: fix rtrack2 CONFIG IO PORT
From: Randy Dunlap <rdunlap@xenotime.net>

Modify radio-rtrack2 to use HEX_STRING(CONFIG_RADIO_RTRACK2_PORT)
so that the correct IO port value is used.

Fixes this error message when CONFIG_RADIO_RTRACK2_PORT=30c:
drivers/media/radio/radio-rtrack2.c:31:17: error: invalid suffix "c" on integer constant

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/media/radio/radio-rtrack2.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- linux-next-20110707.orig/drivers/media/radio/radio-rtrack2.c
+++ linux-next-20110707/drivers/media/radio/radio-rtrack2.c
@@ -13,6 +13,7 @@
#include <linux/init.h> /* Initdata */
#include <linux/ioport.h> /* request_region */
#include <linux/delay.h> /* udelay */
+#include <linux/stringify.h>
#include <linux/videodev2.h> /* kernel radio structs */
#include <linux/mutex.h>
#include <linux/io.h> /* outb, outb_p */
@@ -25,10 +26,12 @@ MODULE_LICENSE("GPL");
MODULE_VERSION("0.0.3");

#ifndef CONFIG_RADIO_RTRACK2_PORT
-#define CONFIG_RADIO_RTRACK2_PORT -1
+#define __RADIO_RTRACK2_PORT -1
+#else
+#define __RADIO_RTRACK2_PORT HEX_STRING(CONFIG_RADIO_RTRACK2_PORT)
#endif

-static int io = CONFIG_RADIO_RTRACK2_PORT;
+static int io = __RADIO_RTRACK2_PORT;
static int radio_nr = -1;

module_param(io, int, 0);

\
 
 \ /
  Last update: 2011-07-10 22:05    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean