[patch 3/3] ipmi: Remove ipmi_major module parameter
From: trenn
Date: Thu Oct 23 2014 - 07:13:18 EST
There should be no need to specify the major number of /dev/ipmiX via module
parameter.
Major number is now always allocated dynamically.
Signed-off-by: Thomas Renninger <trenn@xxxxxxx>
CC: minyard@xxxxxxx
Index: kernel_ipmi/drivers/char/ipmi/ipmi_devintf.c
===================================================================
--- kernel_ipmi.orig/drivers/char/ipmi/ipmi_devintf.c
+++ kernel_ipmi/drivers/char/ipmi/ipmi_devintf.c
@@ -868,13 +868,6 @@ static const struct file_operations ipmi
#define DEVICE_NAME "ipmidev"
static int ipmi_major;
-module_param(ipmi_major, int, 0);
-MODULE_PARM_DESC(ipmi_major, "Sets the major number of the IPMI device. By"
- " default, or if you set it to zero, it will choose the next"
- " available device. Setting it to -1 will disable the"
- " interface. Other values will set the major device number"
- " to that value.");
-
/* Keep track of the devices that are registered. */
struct ipmi_reg_list {
dev_t dev;
@@ -932,9 +925,6 @@ int __init init_ipmi_devintf(void)
{
int rv;
- if (ipmi_major < 0)
- return -EINVAL;
-
printk(KERN_INFO "ipmi device interface\n");
ipmi_class = class_create(THIS_MODULE, "ipmi");
@@ -948,11 +938,8 @@ int __init init_ipmi_devintf(void)
class_destroy(ipmi_class);
printk(KERN_ERR "ipmi: can't get major %d\n", ipmi_major);
return rv;
- }
-
- if (ipmi_major == 0) {
+ } else
ipmi_major = rv;
- }
rv = ipmi_smi_watcher_register(&smi_watcher);
if (rv) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/