Skip to contentSkip to conversation

Watchdog device node name unification

PATCH In review Henrik Brix Andersen 5 participants 15 messages Aug 13, 2005 – Aug 29, 2005 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Watchdog device node name unification

Here's a patch for unifying the watchdog device node name to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.

drivers/char/watchdog/ixp2000_wdt.c +1 -1
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/ixp2000_wdt.c linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp2000_wdt.c
@@ -186,7 +186,7 @@ static struct file_operations ixp2000_wd
 static struct miscdevice ixp2000_wdt_miscdev =
 {
 	.minor		= WATCHDOG_MINOR,
-	.name		= "IXP2000 Watchdog",
+	.name		= "watchdog",
 	.fops		= &ixp2000_wdt_fops,
 };
 
drivers/char/watchdog/ixp4xx_wdt.c +1 -1
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/ixp4xx_wdt.c linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp4xx_wdt.c
@@ -180,7 +180,7 @@ static struct file_operations ixp4xx_wdt
 static struct miscdevice ixp4xx_wdt_miscdev =
 {
 	.minor		= WATCHDOG_MINOR,
-	.name		= "IXP4xx Watchdog",
+	.name		= "watchdog",
 	.fops		= &ixp4xx_wdt_fops,
 };
 
drivers/char/watchdog/sa1100_wdt.c +1 -1
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/sa1100_wdt.c linux-2.6.13-rc6-watchdog/drivers/char/watchdog/sa1100_wdt.c
@@ -176,7 +176,7 @@ static struct file_operations sa1100dog_
 static struct miscdevice sa1100dog_miscdev =
 {
 	.minor		= WATCHDOG_MINOR,
-	.name		= "SA1100/PXA2xx watchdog",
+	.name		= "watchdog",
 	.fops		= &sa1100dog_fops,
 };
 
drivers/char/watchdog/scx200_wdt.c +1 -1
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/scx200_wdt.c linux-2.6.13-rc6-watchdog/drivers/char/watchdog/scx200_wdt.c
@@ -210,7 +210,7 @@ static struct file_operations scx200_wdt
 
 static struct miscdevice scx200_wdt_miscdev = {
 	.minor = WATCHDOG_MINOR,
-	.name  = NAME,
+	.name  = "watchdog",
 	.fops  = &scx200_wdt_fops,
 };
 
Signature · 2 lines
Henrik Brix Andersen <[email protected]>
Gentoo Metadistribution | Mobile computing herd
#1 lore raw
Quoted 7 lines · Henrik Brix Andersen

Here's a patch for unifying the watchdog device node name to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.

The last patch was accidentally against 2.6.12 - this one is against 2.6.13-rc6.

drivers/char/watchdog/ixp2000_wdt.c +1 -1
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/ixp2000_wdt.c linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp2000_wdt.c
@@ -182,7 +182,7 @@ static struct file_operations ixp2000_wd
 static struct miscdevice ixp2000_wdt_miscdev =
 {
 	.minor		= WATCHDOG_MINOR,
-	.name		= "IXP2000 Watchdog",
+	.name		= "watchdog",
 	.fops		= &ixp2000_wdt_fops,
 };
 
drivers/char/watchdog/ixp4xx_wdt.c +1 -1
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/ixp4xx_wdt.c linux-2.6.13-rc6-watchdog/drivers/char/watchdog/ixp4xx_wdt.c
@@ -176,7 +176,7 @@ static struct file_operations ixp4xx_wdt
 static struct miscdevice ixp4xx_wdt_miscdev =
 {
 	.minor		= WATCHDOG_MINOR,
-	.name		= "IXP4xx Watchdog",
+	.name		= "watchdog",
 	.fops		= &ixp4xx_wdt_fops,
 };
 
drivers/char/watchdog/scx200_wdt.c +1 -1
diff -urp linux-2.6.13-rc6/drivers/char/watchdog/scx200_wdt.c linux-2.6.13-rc6-watchdog/drivers/char/watchdog/scx200_wdt.c
@@ -206,7 +206,7 @@ static struct file_operations scx200_wdt
 
 static struct miscdevice scx200_wdt_miscdev = {
 	.minor = WATCHDOG_MINOR,
-	.name  = NAME,
+	.name  = "watchdog",
 	.fops  = &scx200_wdt_fops,
 };
 
Signature · 2 lines
Henrik Brix Andersen <[email protected]>
Gentoo Metadistribution | Mobile computing herd
#2 lore raw
Quoted 3 lines · Henrik Brix Andersen

The last patch was accidentally against 2.6.12 - this one is against 2.6.13-rc6.

Doesn't seem to be serious enough to be worth it at this late stage in the 2.6.13 game. Can you re-send after I do a release?

Linus

#3 lore raw
Quoted 7 lines · Linus Torvalds
Quoted 3 lines · Henrik Brix Andersen

The last patch was accidentally against 2.6.12 - this one is against 2.6.13-rc6.

Doesn't seem to be serious enough to be worth it at this late stage in the 2.6.13 game. Can you re-send after I do a release?

Certainly. I will resend after 2.6.13 has been released.

Regards,
Brix

Signature · 2 lines
Henrik Brix Andersen <[email protected]>
Gentoo Metadistribution | Mobile computing herd
#4 lore raw
In reply to Linus Torvalds
Quoted 2 lines · Linus Torvalds

Doesn't seem to be serious enough to be worth it at this late stage in the 2.6.13 game. Can you re-send after I do a release?

Resending as requested:

Here's a patch for unifying the watchdog device node name to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.

drivers/char/watchdog/ixp2000_wdt.c +1 -1
diff -Nurp linux-2.6.13/drivers/char/watchdog/ixp2000_wdt.c linux-2.6.13-watchdog/drivers/char/watchdog/ixp2000_wdt.c
@@ -182,7 +182,7 @@ static struct file_operations ixp2000_wd
 static struct miscdevice ixp2000_wdt_miscdev =
 {
 	.minor		= WATCHDOG_MINOR,
-	.name		= "IXP2000 Watchdog",
+	.name		= "watchdog",
 	.fops		= &ixp2000_wdt_fops,
 };
 
drivers/char/watchdog/ixp4xx_wdt.c +1 -1
diff -Nurp linux-2.6.13/drivers/char/watchdog/ixp4xx_wdt.c linux-2.6.13-watchdog/drivers/char/watchdog/ixp4xx_wdt.c
@@ -176,7 +176,7 @@ static struct file_operations ixp4xx_wdt
 static struct miscdevice ixp4xx_wdt_miscdev =
 {
 	.minor		= WATCHDOG_MINOR,
-	.name		= "IXP4xx Watchdog",
+	.name		= "watchdog",
 	.fops		= &ixp4xx_wdt_fops,
 };
 
drivers/char/watchdog/scx200_wdt.c +1 -1
diff -Nurp linux-2.6.13/drivers/char/watchdog/scx200_wdt.c linux-2.6.13-watchdog/drivers/char/watchdog/scx200_wdt.c
@@ -206,7 +206,7 @@ static struct file_operations scx200_wdt
 
 static struct miscdevice scx200_wdt_miscdev = {
 	.minor = WATCHDOG_MINOR,
-	.name  = NAME,
+	.name  = "watchdog",
 	.fops  = &scx200_wdt_fops,
 };
 
Signature · 2 lines
Henrik Brix Andersen <[email protected]>
Gentoo Metadistribution | Mobile computing herd
#5 lore raw
Quoted 10 lines · Henrik Brix Andersen
Quoted 2 lines · Linus Torvalds

Doesn't seem to be serious enough to be worth it at this late stage in the 2.6.13 game. Can you re-send after I do a release?

Resending as requested:

Here's a patch for unifying the watchdog device node name to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.

Again, please fix the miscdev code to no pass .name to the dev routines. The miscdev name should be a description and has nothing to do with a device node name.

#6 lore raw
In reply to Henrik Brix Andersen
Quoted 11 lines · Henrik Brix Andersen
Quoted 7 lines · Henrik Brix Andersen

Here's a patch for unifying the watchdog device node name to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.

The last patch was accidentally against 2.6.12 - this one is against 2.6.13-rc6.

A patch like that is sitting in -mm since almost 5 months. I wonder why it was never merged.

#7 lore raw
In reply to Henrik Brix Andersen
Quoted 4 lines · Henrik Brix Andersen

Here's a patch for unifying the watchdog device node name to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.

Please don't. misdevice.name is a description of the device, and doesn't have any relation with the name of the device node.

#8 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 4 lines · Henrik Brix Andersen

Here's a patch for unifying the watchdog device node name to /dev/watchdog as expected by most user-space applications.

Please CC: me on replies as I am not subscribed to LKML.

Please don't. misdevice.name is a description of the device, and doesn't have any relation with the name of the device node.

It is used for /class/misc/$name/dev

#9 lore raw
Quoted 5 lines · Olaf Hering
Quoted 2 lines · Christoph Hellwig

Please don't. misdevice.name is a description of the device, and doesn't have any relation with the name of the device node.

It is used for /class/misc/$name/dev

... and for udev-enabled systems, it's the name of the device node to be created.

./Brix

Signature · 2 lines
Henrik Brix Andersen <[email protected]>
Gentoo Metadistribution | Mobile computing herd
#10 lore raw
Quoted 9 lines · Henrik Brix Andersen
Quoted 5 lines · Olaf Hering
Quoted 2 lines · Christoph Hellwig

Please don't. misdevice.name is a description of the device, and doesn't have any relation with the name of the device node.

It is used for /class/misc/$name/dev

... and for udev-enabled systems, it's the name of the device node to be created.

Looks like people never learn. We had horrible problems with devfs because it decided to overload existing name fields, but the udev brigade does the same idiocy again..

#11 lore raw
Quoted 3 lines · Christoph Hellwig

Looks like people never learn. We had horrible problems with devfs because it decided to overload existing name fields, but the udev brigade does the same idiocy again..

It's not too late to fix this. We can add a new field and rename the old one with minimal effort.

#12 lore raw
In reply to Olaf Hering
Quoted 1 line · Olaf Hering

It is used for /class/misc/$name/dev

Ick. I would almost suggest we change that were it not too late. I think keeping the decription is useful and desirable.

#13 lore raw
Quoted 6 lines · Chris Wedgwood
Quoted 1 line · Olaf Hering

It is used for /class/misc/$name/dev

Ick. I would almost suggest we change that were it not too late. I think keeping the decription is useful and desirable.

Where is the description visible?

#14 lore raw
Quoted 10 lines · Olaf Hering
Quoted 6 lines · Chris Wedgwood
Quoted 1 line · Olaf Hering

It is used for /class/misc/$name/dev

Ick. I would almost suggest we change that were it not too late. I think keeping the decription is useful and desirable.

Where is the description visible?

/proc/misc