public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor@insightbb.com>
To: Bill Nottingham <notting@redhat.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>,
	Chuck Ebbert <cebbert@redhat.com>, Jeff Garzik <jeff@garzik.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.22: pcspkr driver no longer loads automatically
Date: Sun, 4 Nov 2007 01:20:11 -0400	[thread overview]
Message-ID: <200711040120.12640.dtor@insightbb.com> (raw)
In-Reply-To: <20070808193220.GB5001@nostromo.devel.redhat.com>

Hi,

On Wednesday 08 August 2007 15:32, Bill Nottingham wrote:
> Kay Sievers (kay.sievers@vrfy.org) said: 
> > It doesn't have any aliases, so seems it was never autoloaded.
> 
> It was - prior kernels loaded it via the uevent generated from 
> /devices/platform/pcspkr. Newer kernels seem to never actually
> trigger a uevent from that (tested with a combination of
> udevmonitor and 'udevtrigger --subsystem-match=platform'.)
> 

The patch below should restore generation of uevents for pcspkr devices.
Since devices are not created in pcspkr module but rather in arch setup
code it is right (and safe) thing to do.

-- 
Dmitry


pcspkr: restore uevent generation

Make sure that we generate uevents when creating pcspkr devices
so that userspace will load pcspkr driver.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 arch/alpha/kernel/setup.c          |    2 ++
 arch/mips/kernel/pcspeaker.c       |    2 ++
 arch/powerpc/kernel/setup-common.c |    2 ++
 arch/x86/kernel/pcspeaker.c        |    2 ++
 4 files changed, 8 insertions(+)

Index: work/arch/alpha/kernel/setup.c
===================================================================
--- work.orig/arch/alpha/kernel/setup.c
+++ work/arch/alpha/kernel/setup.c
@@ -1501,6 +1501,8 @@ static __init int add_pcspkr(void)
 	if (!pd)
 		return -ENOMEM;
 
+	pd->dev.uevent_suppress = 0;
+
 	ret = platform_device_add(pd);
 	if (ret)
 		platform_device_put(pd);
Index: work/arch/mips/kernel/pcspeaker.c
===================================================================
--- work.orig/arch/mips/kernel/pcspeaker.c
+++ work/arch/mips/kernel/pcspeaker.c
@@ -19,6 +19,8 @@ static __init int add_pcspkr(void)
 	if (!pd)
 		return -ENOMEM;
 
+	pd->dev.uevent_suppress = 0;
+
 	ret = platform_device_add(pd);
 	if (ret)
 		platform_device_put(pd);
Index: work/arch/powerpc/kernel/setup-common.c
===================================================================
--- work.orig/arch/powerpc/kernel/setup-common.c
+++ work/arch/powerpc/kernel/setup-common.c
@@ -454,6 +454,8 @@ static __init int add_pcspkr(void)
 	if (!pd)
 		return -ENOMEM;
 
+	pd->dev.uevent_suppress = 0;
+
 	ret = platform_device_add(pd);
 	if (ret)
 		platform_device_put(pd);
Index: work/arch/x86/kernel/pcspeaker.c
===================================================================
--- work.orig/arch/x86/kernel/pcspeaker.c
+++ work/arch/x86/kernel/pcspeaker.c
@@ -11,6 +11,8 @@ static __init int add_pcspkr(void)
 	if (!pd)
 		return -ENOMEM;
 
+	pd->dev.uevent_suppress = 0;
+
 	ret = platform_device_add(pd);
 	if (ret)
 		platform_device_put(pd);

  parent reply	other threads:[~2007-11-04  5:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 19:33 2.6.22: pcspkr driver no longer loads automatically Chuck Ebbert
2007-08-07 20:43 ` Jeff Garzik
2007-08-07 21:43   ` Chuck Ebbert
2007-08-07 22:23     ` Kay Sievers
2007-08-08 19:32       ` Bill Nottingham
2007-08-08 20:02         ` Kay Sievers
2007-08-08 22:22           ` Bill Nottingham
2007-08-08 22:39             ` Kay Sievers
2007-11-04  5:20         ` Dmitry Torokhov [this message]
2007-11-04  8:30           ` Kay Sievers

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=200711040120.12640.dtor@insightbb.com \
    --to=dtor@insightbb.com \
    --cc=cebbert@redhat.com \
    --cc=jeff@garzik.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=notting@redhat.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