Commit 415db1e8 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] janitor: use request_module()

From: Domen Puncer <domen@coderock.org>
parent 5f49a784
......@@ -456,9 +456,7 @@ void cdev_init(struct cdev *cdev, struct file_operations *fops)
static struct kobject *base_probe(dev_t dev, int *part, void *data)
{
char name[30];
sprintf(name, "char-major-%d", MAJOR(dev));
request_module(name);
request_module("char-major-%d", MAJOR(dev));
return NULL;
}
......
......@@ -157,9 +157,7 @@ struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name)
* If scheduler not found, load the module and search again
*/
if (sched == NULL) {
char module_name[IP_VS_SCHEDNAME_MAXLEN+8];
sprintf(module_name,"ip_vs_%s", sched_name);
request_module(module_name);
request_module("ip_vs_%s", sched_name);
sched = ip_vs_sched_getbyname(sched_name);
}
......
......@@ -148,24 +148,19 @@ static snd_timer_t *snd_timer_find(snd_timer_id_t *tid)
static void snd_timer_request(snd_timer_id_t *tid)
{
char str[32];
switch (tid->dev_class) {
case SNDRV_TIMER_CLASS_GLOBAL:
if (tid->device >= timer_limit)
return;
sprintf(str, "snd-timer-%i", tid->device);
if (tid->device < timer_limit)
request_module("snd-timer-%i", tid->device);
break;
case SNDRV_TIMER_CLASS_CARD:
case SNDRV_TIMER_CLASS_PCM:
if (tid->card >= snd_ecards_limit)
return;
sprintf(str, "snd-card-%i", tid->card);
if (tid->card < snd_ecards_limit)
request_module("snd-card-%i", tid->card);
break;
default:
return;
break;
}
request_module(str);
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment