linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gregory T. Norris" <haphazard@socket.net>
To: rio500-devel <rio500-devel@lists.sourceforge.net>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: [patch] rio500 devfs support
Date: Tue, 19 Jun 2001 17:52:24 -0500	[thread overview]
Message-ID: <20010619175224.A1137@glitch.snoozer.net> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 292 bytes --]

The attached diff adds devfs support to the rio500 driver, so that
/dev/usb/rio500 gets created automagically.  It was generated against
2.4.5, but probably applies fine against any recent kernel.  Comments
are welcome (but be gentle, this is my first attempt at a kernel
patch :-).

Cheers!

[-- Attachment #1.2: rio500-devfs.diff --]
[-- Type: text/plain, Size: 1047 bytes --]

diff -urN linux-2.4.5.orig/drivers/usb/rio500.c linux-2.4.5/drivers/usb/rio500.c
--- linux-2.4.5.orig/drivers/usb/rio500.c	Mon Jun 18 17:10:39 2001
+++ linux-2.4.5/drivers/usb/rio500.c	Tue Jun 19 17:12:26 2001
@@ -38,6 +38,7 @@
 #include <linux/spinlock.h>
 #include <linux/usb.h>
 #include <linux/smp_lock.h>
+#include <linux/devfs_fs_kernel.h>
 
 #include "rio500_usb.h"
 
@@ -70,6 +71,7 @@
 };
 
 static struct rio_usb_data rio_instance;
+static devfs_handle_t rio500_devfs_handle;
 
 static int open_rio(struct inode *inode, struct file *file)
 {
@@ -492,6 +494,12 @@
 	if (usb_register(&rio_driver) < 0)
 		return -1;
 
+	rio500_devfs_handle = devfs_register(NULL, "usb/rio500",
+					DEVFS_FL_DEFAULT,
+					USB_MAJOR, RIO_MINOR,
+					S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP,
+					&usb_rio_fops, NULL);
+
 	info(DRIVER_VERSION " " DRIVER_AUTHOR);
 	info(DRIVER_DESC);
 
@@ -506,6 +514,7 @@
 	rio->present = 0;
 	usb_deregister(&rio_driver);
 
+	devfs_unregister(rio500_devfs_handle);
 
 }
 

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

             reply	other threads:[~2001-06-19 22:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-19 22:52 Gregory T. Norris [this message]
2001-06-24 22:37 ` [patch] rio500 devfs support Gregory T. Norris
2001-06-25  6:16 ` Richard Gooch
2001-06-25 11:43   ` Gregory T. Norris
2001-06-25 17:35 ` Greg KH
2001-06-25 22:12   ` Gregory T. Norris
2001-06-26  5:07     ` Greg KH
2001-07-01 20:55     ` Gregory T. Norris

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=20010619175224.A1137@glitch.snoozer.net \
    --to=haphazard@socket.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rio500-devel@lists.sourceforge.net \
    /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).