From: Bob Liu <lliubbo@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: chrisw@sous-sol.org, tomas.winkler@intel.com,
johannes.berg@intel.com, dmitry.torokhov@gmail.com,
gregkh@suse.de, Bob Liu <lliubbo@gmail.com>
Subject: [PATCH] firmware_classs: change val uevent's type to bool
Date: Wed, 26 Jan 2011 18:00:04 +0800 [thread overview]
Message-ID: <1296036004-15644-1-git-send-email-lliubbo@gmail.com> (raw)
Some place in firmware_class.c using "int uevent" define, but others use "bool
uevent".
This patch replace all int uevent define to bool and fix a place missing
uevent check.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
drivers/base/firmware_class.c | 10 +++++-----
include/linux/firmware.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 40af43e..9ef8941 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -463,7 +463,8 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
f_dev->parent = device;
f_dev->class = &firmware_class;
- dev_set_uevent_suppress(f_dev, true);
+ if (uevent)
+ dev_set_uevent_suppress(f_dev, true);
/* Need to pin this module until class device is destroyed */
__module_get(THIS_MODULE);
@@ -593,8 +594,7 @@ int
request_firmware(const struct firmware **firmware_p, const char *name,
struct device *device)
{
- int uevent = 1;
- return _request_firmware(firmware_p, name, device, uevent, false);
+ return _request_firmware(firmware_p, name, device, true, false);
}
/**
@@ -618,7 +618,7 @@ struct firmware_work {
struct device *device;
void *context;
void (*cont)(const struct firmware *fw, void *context);
- int uevent;
+ bool uevent;
};
static int request_firmware_work_func(void *arg)
@@ -661,7 +661,7 @@ static int request_firmware_work_func(void *arg)
**/
int
request_firmware_nowait(
- struct module *module, int uevent,
+ struct module *module, bool uevent,
const char *name, struct device *device, gfp_t gfp, void *context,
void (*cont)(const struct firmware *fw, void *context))
{
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 53d1e6c..21b3e75 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -39,7 +39,7 @@ struct builtin_fw {
int request_firmware(const struct firmware **fw, const char *name,
struct device *device);
int request_firmware_nowait(
- struct module *module, int uevent,
+ struct module *module, bool uevent,
const char *name, struct device *device, gfp_t gfp, void *context,
void (*cont)(const struct firmware *fw, void *context));
@@ -52,7 +52,7 @@ static inline int request_firmware(const struct firmware **fw,
return -EINVAL;
}
static inline int request_firmware_nowait(
- struct module *module, int uevent,
+ struct module *module, bool uevent,
const char *name, struct device *device, gfp_t gfp, void *context,
void (*cont)(const struct firmware *fw, void *context))
{
--
1.6.3.3
next reply other threads:[~2011-01-26 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-26 10:00 Bob Liu [this message]
2011-01-26 9:56 ` [PATCH] firmware_classs: change val uevent's type to bool Berg, Johannes
2011-01-26 10:03 ` Bob Liu
2011-01-26 10:15 ` Greg KH
2011-01-26 10:23 ` Berg, Johannes
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=1296036004-15644-1-git-send-email-lliubbo@gmail.com \
--to=lliubbo@gmail.com \
--cc=chrisw@sous-sol.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@suse.de \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tomas.winkler@intel.com \
/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.