From: Jiri Olsa <olsajiri@gmail.com>
To: rubini@vision.unipv.it
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] misc: ifdef KMOD, saving some bytes probably
Date: Fri, 08 Feb 2008 17:48:14 +0100 [thread overview]
Message-ID: <47AC87CE.2060200@gmail.com> (raw)
found some code in misc.c that could be ifdef'ed for KMOD
Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
---
drivers/char/misc.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index a39101f..3455b09 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -126,7 +126,8 @@ static int misc_open(struct inode * inode, struct file * file)
break;
}
}
-
+
+#if defined(CONFIG_KMOD)
if (!new_fops) {
mutex_unlock(&misc_mtx);
request_module("char-major-%d-%d", MISC_MAJOR, minor);
@@ -141,6 +142,10 @@ static int misc_open(struct inode * inode, struct file * file)
if (!new_fops)
goto fail;
}
+#else
+ if (!new_fops)
+ goto fail;
+#endif
err = 0;
old_fops = file->f_op;
next reply other threads:[~2008-02-08 16:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 16:48 Jiri Olsa [this message]
2008-02-08 17:30 ` [PATCH] misc: ifdef KMOD, saving some bytes probably Sam Ravnborg
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=47AC87CE.2060200@gmail.com \
--to=olsajiri@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rubini@vision.unipv.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.