* [PATCH] PHYSDEVDRIVER=<NULL>
@ 2005-02-17 14:08 Olaf Hering
2005-02-17 17:31 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2005-02-17 14:08 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
For some reasons, PHYSDEVDRIVER can be <NULL> for block events.
So just check for that.
base/class.c | 4 ++--
base/core.c | 4 ++--
block/genhd.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
Signed-off-by: Olaf Hering <olh@suse.de>
diff -purNx tags ../linux-2.6.11-rc4.orig/drivers/base/class.c ./drivers/base/class.c
--- ../linux-2.6.11-rc4.orig/drivers/base/class.c 2005-02-13 04:08:06.000000000 +0100
+++ ./drivers/base/class.c 2005-02-17 14:42:56.000000000 +0100
@@ -314,13 +314,13 @@ static int class_hotplug(struct kset *ks
kfree(path);
/* add bus name of physical device */
- if (dev->bus)
+ if (dev->bus && dev->bus->name)
add_hotplug_env_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"PHYSDEVBUS=%s", dev->bus->name);
/* add driver name of physical device */
- if (dev->driver)
+ if (dev->driver && dev->driver->name)
add_hotplug_env_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"PHYSDEVDRIVER=%s", dev->driver->name);
diff -purNx tags ../linux-2.6.11-rc4.orig/drivers/base/core.c ./drivers/base/core.c
--- ../linux-2.6.11-rc4.orig/drivers/base/core.c 2005-02-13 04:05:10.000000000 +0100
+++ ./drivers/base/core.c 2005-02-17 14:42:08.000000000 +0100
@@ -121,13 +121,13 @@ static int dev_hotplug(struct kset *kset
int retval = 0;
/* add bus name of physical device */
- if (dev->bus)
+ if (dev->bus && dev->bus->name)
add_hotplug_env_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"PHYSDEVBUS=%s", dev->bus->name);
/* add driver name of physical device */
- if (dev->driver)
+ if (dev->driver && dev->driver->name)
add_hotplug_env_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"PHYSDEVDRIVER=%s", dev->driver->name);
diff -purNx tags ../linux-2.6.11-rc4.orig/drivers/block/genhd.c ./drivers/block/genhd.c
--- ../linux-2.6.11-rc4.orig/drivers/block/genhd.c 2005-02-13 04:06:23.000000000 +0100
+++ ./drivers/block/genhd.c 2005-02-17 14:43:26.000000000 +0100
@@ -453,13 +453,13 @@ static int block_hotplug(struct kset *ks
kfree(path);
/* add bus name of physical device */
- if (dev->bus)
+ if (dev->bus && dev->bus->name)
add_hotplug_env_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"PHYSDEVBUS=%s", dev->bus->name);
/* add driver name of physical device */
- if (dev->driver)
+ if (dev->driver && dev->driver->name)
add_hotplug_env_var(envp, num_envp, &i,
buffer, buffer_size, &length,
"PHYSDEVDRIVER=%s", dev->driver->name);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PHYSDEVDRIVER=<NULL>
2005-02-17 14:08 [PATCH] PHYSDEVDRIVER=<NULL> Olaf Hering
@ 2005-02-17 17:31 ` Greg KH
2005-02-17 18:07 ` Olaf Hering
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2005-02-17 17:31 UTC (permalink / raw)
To: Olaf Hering; +Cc: linux-kernel
On Thu, Feb 17, 2005 at 03:08:58PM +0100, Olaf Hering wrote:
>
> For some reasons, PHYSDEVDRIVER can be <NULL> for block events.
> So just check for that.
That's odd. Any idea what driver causes this? A bus should always have
a name associated with it. I'd rather fix the broken bus driver.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PHYSDEVDRIVER=<NULL>
2005-02-17 17:31 ` Greg KH
@ 2005-02-17 18:07 ` Olaf Hering
0 siblings, 0 replies; 3+ messages in thread
From: Olaf Hering @ 2005-02-17 18:07 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
On Thu, Feb 17, Greg KH wrote:
> On Thu, Feb 17, 2005 at 03:08:58PM +0100, Olaf Hering wrote:
> >
> > For some reasons, PHYSDEVDRIVER can be <NULL> for block events.
> > So just check for that.
>
> That's odd. Any idea what driver causes this? A bus should always have
> a name associated with it. I'd rather fix the broken bus driver.
I dont know what driver caused this, its one of these weird intel
laptops.
But I fixed it in userland by quoting the enviroment variables.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-02-17 18:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-17 14:08 [PATCH] PHYSDEVDRIVER=<NULL> Olaf Hering
2005-02-17 17:31 ` Greg KH
2005-02-17 18:07 ` Olaf Hering
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).