I don't really like this section though. The casting I have now isn't
pleasant, but I don't like adding a new global to get rid of it.
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 542c9ef..02d132e 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -74,12 +74,11 @@ static DECLARE_WORK(mconsole_work, mc_work_proc);
static irqreturn_t mconsole_interrupt(int irq, void *dev_id)
{
- /* long to avoid size mismatch warnings from gcc */
- long fd;
+ int fd;
struct mconsole_entry *new;
static struct mc_request req; /* that's OK */
- fd = (long) dev_id;
+ fd = *((int *) dev_id);
while (mconsole_get_request(fd, &req)){
if(req.cmd->context == MCONSOLE_INTR)
(*req.cmd->handler)(&req);
@@ -798,10 +797,10 @@ void mconsole_stack(struct mc_request *req)
*/
static char *notify_socket = NULL;
+static int sock;
+
static int mconsole_init(void)
{
- /* long to avoid size mismatch warnings from gcc */
- long sock;
int err;
char file[256];
@@ -818,7 +817,7 @@ static int mconsole_init(void)
err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt,
IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
- "mconsole", (void *)sock);
+ "mconsole", &sock);
if (err){
printk("Failed to get IRQ for management console\n");
return(1);
Jeff