mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: trenn@suse.de
To: minyard@acm.org
Cc: martin.wilck@ts.fujitsu.com, trenn@suse.de,
	linux-kernel@vger.kernel.org,
	openipmi-developer@lists.sourceforge.net
Subject: [patch 3/3] ipmi: Remove ipmi_major module parameter
Date: Thu, 23 Oct 2014 13:09:27 +0200	[thread overview]
Message-ID: <20141023111307.714821577@ett.arch.suse.de> (raw)
In-Reply-To: <20141023110924.936986783@ett.arch.suse.de>

[-- Attachment #1: remove_major_param.patch --]
[-- Type: text/plain, Size: 1487 bytes --]

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@suse.de>
CC: minyard@acm.org

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) {


      parent reply	other threads:[~2014-10-23 11:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 11:09 [patch 0/3] Compile ipmi_devintf into ipmi_msghandler trenn
2014-10-23 11:09 ` [patch 1/3] IPMI: Move/rename ipmi_msghandler.c to ipmi_handler.c trenn
2014-10-23 11:09 ` [patch 2/3] ipmi: Setup ipmi_devintf automatically if ipmi_msghandler gets loaded trenn
2014-10-23 11:09 ` trenn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141023111307.714821577@ett.arch.suse.de \
    --to=trenn@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.wilck@ts.fujitsu.com \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®