* [PATCH] (2.6.7-rc1) ADB driver fails to create /dev/adb
@ 2004-05-25 19:45 Colin Leroy
2004-05-25 20:29 ` Colin Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Colin Leroy @ 2004-05-25 19:45 UTC (permalink / raw)
To: benh; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
Hi,
adb driver in 2.6.7-rc1 fails to create /dev/adb (noticed because
pbbuttonsd complains and doesn't work).
I looked at the differences with 2.6.6's driver, and saw that the
devfs bit was removed. Was there a reason for that, apart the fact that
devfs is obsolete ?
Here's a patch that restores previous behaviour. (I bothered because I
noticed lots of other drivers still using devfs_mk_cdev() and I think
it should stay here for a bit more).
hth,
--
Colin
[-- Attachment #2: adb.c.patch --]
[-- Type: application/octet-stream, Size: 500 bytes --]
--- drivers/macintosh/adb.c.orig 2004-05-25 21:08:10.738489304 +0200
+++ drivers/macintosh/adb.c 2004-05-25 21:28:54.161460280 +0200
@@ -898,6 +898,9 @@
{
if (register_chrdev(ADB_MAJOR, "adb", &adb_fops)) {
printk(KERN_ERR "adb: unable to get major %d\n", ADB_MAJOR);
+ } else if (devfs_mk_cdev(MKDEV(ADB_MAJOR, 0),
+ S_IFCHR | S_IRUSR | S_IWUSR, "adb")) {
+ printk(KERN_ERR "adb: unable to make dev via devfs\n");
return;
}
adb_dev_class = class_simple_create(THIS_MODULE, "adb");
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] (2.6.7-rc1) ADB driver fails to create /dev/adb
2004-05-25 19:45 [PATCH] (2.6.7-rc1) ADB driver fails to create /dev/adb Colin Leroy
@ 2004-05-25 20:29 ` Colin Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Colin Leroy @ 2004-05-25 20:29 UTC (permalink / raw)
To: benh; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 327 bytes --]
On 25 May 2004 at 21h05, Colin Leroy wrote:
Hi,
> Here's a patch that restores previous behaviour. (I bothered because I
> noticed lots of other drivers still using devfs_mk_cdev() and I think
> it should stay here for a bit more).
Mmh, here's a nicer patch (forgot a return, and the else isn't the most
clear).
--
Colin
[-- Attachment #2: adb.c.patch --]
[-- Type: text/plain, Size: 538 bytes --]
--- drivers/macintosh/adb.c.orig 2004-05-25 21:08:10.000000000 +0200
+++ drivers/macintosh/adb.c 2004-05-25 22:27:04.596656712 +0200
@@ -899,6 +899,11 @@
if (register_chrdev(ADB_MAJOR, "adb", &adb_fops)) {
printk(KERN_ERR "adb: unable to get major %d\n", ADB_MAJOR);
return;
+ }
+ if (devfs_mk_cdev(MKDEV(ADB_MAJOR, 0),
+ S_IFCHR | S_IRUSR | S_IWUSR, "adb")) {
+ printk(KERN_ERR "adb: unable to make dev via devfs\n");
+ return;
}
adb_dev_class = class_simple_create(THIS_MODULE, "adb");
if (IS_ERR(adb_dev_class)) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-05-25 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-25 19:45 [PATCH] (2.6.7-rc1) ADB driver fails to create /dev/adb Colin Leroy
2004-05-25 20:29 ` Colin Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®