Fix GCC warning in call to request_module(): "format not a string literal
authorIan Abbott <abbotti@mev.co.uk>
Mon, 9 Feb 2009 16:32:12 +0000 (16:32 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 9 Feb 2009 16:32:12 +0000 (16:32 +0000)
and no format arguments".

comedi/comedi_fops.c

index 8e976a6dbcc3841cd57e7f86fdc8b9cd6b832281..7fc40ca1a1defd91bd324305156b4caff86ad578 100644 (file)
@@ -1754,7 +1754,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);
        comedi_device *dev = dev_file_info->device;
@@ -1789,10 +1788,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