From: Grazvydas Ignotas <notasas@gmail.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: linux-wireless@vger.kernel.org, Grazvydas Ignotas <notasas@gmail.com>
Subject: [PATCH] compat: fix uevent_suppress on 2.6.29 or older kernels
Date: Thu, 22 Apr 2010 16:54:02 +0300 [thread overview]
Message-ID: <1271944442-9214-1-git-send-email-notasas@gmail.com> (raw)
Missing uevent_suppress is causing two uevents instead of one, which is
confusing udev and sometimes causing firmware load to fail due to race
condition, so let's add it.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
---
compat/compat_firmware_class.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/compat/compat_firmware_class.c b/compat/compat_firmware_class.c
index ce937a3..54ee8b9 100644
--- a/compat/compat_firmware_class.c
+++ b/compat/compat_firmware_class.c
@@ -432,6 +432,8 @@ static int fw_register_device(struct device **dev_p, const char *fw_name,
dev_set_drvdata(f_dev, fw_priv);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
dev_set_uevent_suppress(f_dev, 1);
+#else
+ f_dev->uevent_suppress = 1;
#endif
retval = device_register(f_dev);
if (retval) {
@@ -479,9 +481,11 @@ static int fw_setup_device(struct firmware *fw, struct device **dev_p,
goto error_unreg;
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
if (uevent)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
dev_set_uevent_suppress(f_dev, 0);
+#else
+ f_dev->uevent_suppress = 0;
#endif
*dev_p = f_dev;
goto out;
--
1.7.0.2
next reply other threads:[~2010-04-22 13:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 13:54 Grazvydas Ignotas [this message]
2010-04-22 15:17 ` [PATCH] compat: fix uevent_suppress on 2.6.29 or older kernels Walter Goldens
2010-04-22 16:33 ` Luis R. Rodriguez
2010-04-22 16:42 ` Pavel Roskin
2010-04-22 20:33 ` Luis R. Rodriguez
2010-04-22 20:47 ` Grazvydas Ignotas
2010-04-23 5:57 ` Johannes Berg
2010-04-23 6:01 ` Luis R. Rodriguez
2010-04-22 20:50 ` Pavel Roskin
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=1271944442-9214-1-git-send-email-notasas@gmail.com \
--to=notasas@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).