Staging: comedi: newer gcc warning fixes
authorIan Abbott <abbotti@mev.co.uk>
Mon, 9 Feb 2009 16:32:12 +0000 (16:32 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Apr 2009 21:53:52 +0000 (14:53 -0700)
Fix GCC warning in call to request_module(): "format not a string
literal and no format arguments".

From: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: David Schleef <ds@schleef.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/comedi_fops.c

index fbd3d1c6c64715db47a50e2ca8b5570ae6b3b2e3..6867b0938e150d4f1ae21fc017344bbd813b2e02 100644 (file)
@@ -1757,7 +1757,6 @@ void do_become_nonbusy(comedi_device *dev, comedi_subdevice *s)
 
 static int comedi_open(struct inode *inode, struct file *file)
 {
-       char mod[32];
        const unsigned minor = iminor(inode);
        struct comedi_device_file_info *dev_file_info =
            comedi_get_device_file_info(minor);
@@ -1793,10 +1792,9 @@ static int comedi_open(struct inode *inode, struct file *file)
 
        dev->in_request_module = 1;
 
-       sprintf(mod, "char-major-%i-%i", COMEDI_MAJOR, dev->minor);
 #ifdef CONFIG_KMOD
        mutex_unlock(&dev->mutex);
-       request_module(mod);
+       request_module("char-major-%i-%i", COMEDI_MAJOR, dev->minor);
        mutex_lock(&dev->mutex);
 #endif