Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
36a674f3
Commit
36a674f3
authored
Apr 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] devfs: usb
parent
cdc053a0
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
41 deletions
+19
-41
drivers/usb/class/usblp.c
drivers/usb/class/usblp.c
+2
-5
drivers/usb/core/file.c
drivers/usb/core/file.c
+2
-5
drivers/usb/image/scanner.c
drivers/usb/image/scanner.c
+3
-4
drivers/usb/image/scanner.h
drivers/usb/image/scanner.h
+0
-2
drivers/usb/input/hiddev.c
drivers/usb/input/hiddev.c
+4
-6
drivers/usb/misc/auerswald.c
drivers/usb/misc/auerswald.c
+2
-3
drivers/usb/misc/brlvger.c
drivers/usb/misc/brlvger.c
+2
-8
drivers/usb/misc/rio500.c
drivers/usb/misc/rio500.c
+2
-5
drivers/usb/usb-skeleton.c
drivers/usb/usb-skeleton.c
+2
-3
No files found.
drivers/usb/class/usblp.c
View file @
36a674f3
...
@@ -130,7 +130,6 @@ MFG:HEWLETT-PACKARD;MDL:DESKJET 970C;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:H
...
@@ -130,7 +130,6 @@ MFG:HEWLETT-PACKARD;MDL:DESKJET 970C;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:H
struct
usblp
{
struct
usblp
{
struct
usb_device
*
dev
;
/* USB device */
struct
usb_device
*
dev
;
/* USB device */
devfs_handle_t
devfs
;
/* devfs device */
struct
semaphore
sem
;
/* locks this struct, especially "dev" */
struct
semaphore
sem
;
/* locks this struct, especially "dev" */
char
*
writebuf
;
/* write transfer_buffer */
char
*
writebuf
;
/* write transfer_buffer */
char
*
readbuf
;
/* read transfer_buffer */
char
*
readbuf
;
/* read transfer_buffer */
...
@@ -163,7 +162,6 @@ static void usblp_dump(struct usblp *usblp) {
...
@@ -163,7 +162,6 @@ static void usblp_dump(struct usblp *usblp) {
dbg
(
"usblp=0x%p"
,
usblp
);
dbg
(
"usblp=0x%p"
,
usblp
);
dbg
(
"dev=0x%p"
,
usblp
->
dev
);
dbg
(
"dev=0x%p"
,
usblp
->
dev
);
dbg
(
"devfs=0x%p"
,
usblp
->
devfs
);
dbg
(
"buf=0x%p"
,
usblp
->
buf
);
dbg
(
"buf=0x%p"
,
usblp
->
buf
);
dbg
(
"readcount=%d"
,
usblp
->
readcount
);
dbg
(
"readcount=%d"
,
usblp
->
readcount
);
dbg
(
"ifnum=%d"
,
usblp
->
ifnum
);
dbg
(
"ifnum=%d"
,
usblp
->
ifnum
);
...
@@ -382,7 +380,7 @@ static int usblp_open(struct inode *inode, struct file *file)
...
@@ -382,7 +380,7 @@ static int usblp_open(struct inode *inode, struct file *file)
static
void
usblp_cleanup
(
struct
usblp
*
usblp
)
static
void
usblp_cleanup
(
struct
usblp
*
usblp
)
{
{
devfs_
unregister
(
usblp
->
devfs
);
devfs_
remove
(
"usb/lp%d"
,
usblp
->
minor
);
usb_deregister_dev
(
1
,
usblp
->
minor
);
usb_deregister_dev
(
1
,
usblp
->
minor
);
info
(
"usblp%d: removed"
,
usblp
->
minor
);
info
(
"usblp%d: removed"
,
usblp
->
minor
);
...
@@ -908,8 +906,7 @@ static int usblp_probe(struct usb_interface *intf,
...
@@ -908,8 +906,7 @@ static int usblp_probe(struct usb_interface *intf,
/* If we have devfs, create with perms=660. */
/* If we have devfs, create with perms=660. */
sprintf
(
name
,
"usb/lp%d"
,
usblp
->
minor
);
sprintf
(
name
,
"usb/lp%d"
,
usblp
->
minor
);
usblp
->
devfs
=
devfs_register
(
NULL
,
name
,
devfs_register
(
NULL
,
name
,
0
,
USB_MAJOR
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
usblp
->
minor
,
usblp
->
minor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
,
&
usblp_fops
,
NULL
);
S_IWGRP
,
&
usblp_fops
,
NULL
);
...
...
drivers/usb/core/file.c
View file @
36a674f3
...
@@ -28,8 +28,6 @@
...
@@ -28,8 +28,6 @@
#endif
#endif
#include <linux/usb.h>
#include <linux/usb.h>
static
devfs_handle_t
usb_devfs_handle
;
/* /dev/usb dir. */
#define MAX_USB_MINORS 256
#define MAX_USB_MINORS 256
static
struct
file_operations
*
usb_minors
[
MAX_USB_MINORS
];
static
struct
file_operations
*
usb_minors
[
MAX_USB_MINORS
];
static
spinlock_t
minor_lock
=
SPIN_LOCK_UNLOCKED
;
static
spinlock_t
minor_lock
=
SPIN_LOCK_UNLOCKED
;
...
@@ -75,14 +73,13 @@ int usb_major_init(void)
...
@@ -75,14 +73,13 @@ int usb_major_init(void)
return
-
EBUSY
;
return
-
EBUSY
;
}
}
usb_devfs_handle
=
devfs_mk_dir
(
"usb"
);
devfs_mk_dir
(
"usb"
);
return
0
;
return
0
;
}
}
void
usb_major_cleanup
(
void
)
void
usb_major_cleanup
(
void
)
{
{
devfs_
unregister
(
usb_devfs_handle
);
devfs_
remove
(
"usb"
);
unregister_chrdev
(
USB_MAJOR
,
"usb"
);
unregister_chrdev
(
USB_MAJOR
,
"usb"
);
}
}
...
...
drivers/usb/image/scanner.c
View file @
36a674f3
...
@@ -397,6 +397,7 @@
...
@@ -397,6 +397,7 @@
*/
*/
#include <linux/devfs_fs_kernel.h>
#include <asm/byteorder.h>
#include <asm/byteorder.h>
/*
/*
...
@@ -843,7 +844,7 @@ static void destroy_scanner (struct kobject *kobj)
...
@@ -843,7 +844,7 @@ static void destroy_scanner (struct kobject *kobj)
kfree
(
scn
->
obuf
);
kfree
(
scn
->
obuf
);
dbg
(
"%s: De-allocating minor:%d"
,
__FUNCTION__
,
scn
->
scn_minor
);
dbg
(
"%s: De-allocating minor:%d"
,
__FUNCTION__
,
scn
->
scn_minor
);
devfs_
unregister
(
scn
->
devfs
);
devfs_
remove
(
"usb/scanner%d"
,
scn
->
scn_minor
-
SCN_BASE_MNR
);
usb_deregister_dev
(
1
,
scn
->
scn_minor
);
usb_deregister_dev
(
1
,
scn
->
scn_minor
);
usb_free_urb
(
scn
->
scn_irq
);
usb_free_urb
(
scn
->
scn_irq
);
usb_put_dev
(
scn
->
scn_dev
);
usb_put_dev
(
scn
->
scn_dev
);
...
@@ -1105,13 +1106,11 @@ probe_scanner(struct usb_interface *intf,
...
@@ -1105,13 +1106,11 @@ probe_scanner(struct usb_interface *intf,
sprintf
(
name
,
"usb/scanner%d"
,
scn
->
scn_minor
-
SCN_BASE_MNR
);
sprintf
(
name
,
"usb/scanner%d"
,
scn
->
scn_minor
-
SCN_BASE_MNR
);
scn
->
devfs
=
devfs_register
(
NULL
,
name
,
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
scn
->
scn_minor
,
scn
->
scn_minor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
|
S_IROTH
|
S_IWOTH
,
&
usb_scanner_fops
,
NULL
);
S_IWGRP
|
S_IROTH
|
S_IWOTH
,
&
usb_scanner_fops
,
NULL
);
if
(
scn
->
devfs
==
NULL
)
dbg
(
"scanner%d: device node registration failed"
,
scn_minor
);
info
(
"USB scanner device (0x%04x/0x%04x) now attached to %s"
,
info
(
"USB scanner device (0x%04x/0x%04x) now attached to %s"
,
dev
->
descriptor
.
idVendor
,
dev
->
descriptor
.
idProduct
,
name
);
dev
->
descriptor
.
idVendor
,
dev
->
descriptor
.
idProduct
,
name
);
...
...
drivers/usb/image/scanner.h
View file @
36a674f3
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
#include <linux/ioctl.h>
#include <linux/ioctl.h>
#include <linux/sched.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/smp_lock.h>
#include <linux/devfs_fs_kernel.h>
// #define DEBUG
// #define DEBUG
...
@@ -336,7 +335,6 @@ static DECLARE_MUTEX (scn_mutex); /* Initializes to unlocked */
...
@@ -336,7 +335,6 @@ static DECLARE_MUTEX (scn_mutex); /* Initializes to unlocked */
struct
scn_usb_data
{
struct
scn_usb_data
{
struct
usb_device
*
scn_dev
;
struct
usb_device
*
scn_dev
;
devfs_handle_t
devfs
;
/* devfs device */
struct
urb
*
scn_irq
;
struct
urb
*
scn_irq
;
unsigned
int
ifnum
;
/* Interface number of the USB device */
unsigned
int
ifnum
;
/* Interface number of the USB device */
int
scn_minor
;
/* Scanner minor - used in disconnect() */
int
scn_minor
;
/* Scanner minor - used in disconnect() */
...
...
drivers/usb/input/hiddev.c
View file @
36a674f3
...
@@ -50,7 +50,6 @@ struct hiddev {
...
@@ -50,7 +50,6 @@ struct hiddev {
int
open
;
int
open
;
int
minor
;
int
minor
;
wait_queue_head_t
wait
;
wait_queue_head_t
wait
;
devfs_handle_t
devfs
;
struct
hid_device
*
hid
;
struct
hid_device
*
hid
;
struct
hiddev_list
*
list
;
struct
hiddev_list
*
list
;
};
};
...
@@ -66,7 +65,6 @@ struct hiddev_list {
...
@@ -66,7 +65,6 @@ struct hiddev_list {
};
};
static
struct
hiddev
*
hiddev_table
[
HIDDEV_MINORS
];
static
struct
hiddev
*
hiddev_table
[
HIDDEV_MINORS
];
static
devfs_handle_t
hiddev_devfs_handle
;
/* forward reference to make our lives easier */
/* forward reference to make our lives easier */
extern
struct
usb_driver
hiddev_driver
;
extern
struct
usb_driver
hiddev_driver
;
...
@@ -229,7 +227,7 @@ static int hiddev_fasync(int fd, struct file *file, int on)
...
@@ -229,7 +227,7 @@ static int hiddev_fasync(int fd, struct file *file, int on)
*/
*/
static
void
hiddev_cleanup
(
struct
hiddev
*
hiddev
)
static
void
hiddev_cleanup
(
struct
hiddev
*
hiddev
)
{
{
devfs_
unregister
(
hiddev
->
devfs
);
devfs_
remove
(
"usb/hid/hiddev%d"
,
hiddev
->
minor
);
usb_deregister_dev
(
1
,
hiddev
->
minor
);
usb_deregister_dev
(
1
,
hiddev
->
minor
);
hiddev_table
[
hiddev
->
minor
]
=
NULL
;
hiddev_table
[
hiddev
->
minor
]
=
NULL
;
kfree
(
hiddev
);
kfree
(
hiddev
);
...
@@ -716,8 +714,8 @@ int hiddev_connect(struct hid_device *hid)
...
@@ -716,8 +714,8 @@ int hiddev_connect(struct hid_device *hid)
hiddev
->
exist
=
1
;
hiddev
->
exist
=
1
;
sprintf
(
devfs_name
,
"usb/hid/hiddev%d"
,
minor
);
sprintf
(
devfs_name
,
"usb/hid/hiddev%d"
,
minor
);
hiddev
->
devfs
=
devfs_register
(
NULL
,
devfs_name
,
devfs_register
(
NULL
,
devfs_name
,
0
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
minor
+
HIDDEV_MINOR_BASE
,
USB_MAJOR
,
minor
+
HIDDEV_MINOR_BASE
,
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
&
hiddev_fops
,
NULL
);
S_IFCHR
|
S_IRUGO
|
S_IWUSR
,
&
hiddev_fops
,
NULL
);
hid
->
minor
=
minor
;
hid
->
minor
=
minor
;
hid
->
hiddev
=
hiddev
;
hid
->
hiddev
=
hiddev
;
...
@@ -774,7 +772,7 @@ static /* const */ struct usb_driver hiddev_driver = {
...
@@ -774,7 +772,7 @@ static /* const */ struct usb_driver hiddev_driver = {
int
__init
hiddev_init
(
void
)
int
__init
hiddev_init
(
void
)
{
{
hiddev_devfs_handle
=
devfs_mk_dir
(
"usb/hid"
);
devfs_mk_dir
(
"usb/hid"
);
usb_register
(
&
hiddev_driver
);
usb_register
(
&
hiddev_driver
);
return
0
;
return
0
;
}
}
...
...
drivers/usb/misc/auerswald.c
View file @
36a674f3
...
@@ -242,7 +242,6 @@ typedef struct
...
@@ -242,7 +242,6 @@ typedef struct
struct
semaphore
mutex
;
/* protection in user context */
struct
semaphore
mutex
;
/* protection in user context */
char
name
[
20
];
/* name of the /dev/usb entry */
char
name
[
20
];
/* name of the /dev/usb entry */
unsigned
int
dtindex
;
/* index in the device table */
unsigned
int
dtindex
;
/* index in the device table */
devfs_handle_t
devfs
;
/* devfs device node */
struct
usb_device
*
usbdev
;
/* USB device handle */
struct
usb_device
*
usbdev
;
/* USB device handle */
int
open_count
;
/* count the number of open character channels */
int
open_count
;
/* count the number of open character channels */
char
dev_desc
[
AUSI_DLEN
];
/* for storing a textual description */
char
dev_desc
[
AUSI_DLEN
];
/* for storing a textual description */
...
@@ -1972,7 +1971,7 @@ static int auerswald_probe (struct usb_interface *intf,
...
@@ -1972,7 +1971,7 @@ static int auerswald_probe (struct usb_interface *intf,
up
(
&
dev_table_mutex
);
up
(
&
dev_table_mutex
);
/* initialize the devfs node for this device and register it */
/* initialize the devfs node for this device and register it */
cp
->
devfs
=
devfs_register
(
NULL
,
cp
->
name
,
0
,
USB_MAJOR
,
devfs_register
(
NULL
,
cp
->
name
,
0
,
USB_MAJOR
,
AUER_MINOR_BASE
+
dtindex
,
AUER_MINOR_BASE
+
dtindex
,
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
S_IFCHR
|
S_IRUGO
|
S_IWUGO
,
&
auerswald_fops
,
NULL
);
&
auerswald_fops
,
NULL
);
...
@@ -2092,7 +2091,7 @@ static void auerswald_disconnect (struct usb_interface *intf)
...
@@ -2092,7 +2091,7 @@ static void auerswald_disconnect (struct usb_interface *intf)
/* remove our devfs node */
/* remove our devfs node */
/* Nobody can see this device any more */
/* Nobody can see this device any more */
devfs_
unregister
(
cp
->
devfs
);
devfs_
remove
(
cp
->
name
);
/* give back our USB minor number */
/* give back our USB minor number */
usb_deregister_dev
(
1
,
cp
->
dtindex
);
usb_deregister_dev
(
1
,
cp
->
dtindex
);
...
...
drivers/usb/misc/brlvger.c
View file @
36a674f3
...
@@ -156,7 +156,6 @@ struct brlvger_priv {
...
@@ -156,7 +156,6 @@ struct brlvger_priv {
struct
usb_device
*
dev
;
/* USB device handle */
struct
usb_device
*
dev
;
/* USB device handle */
struct
usb_endpoint_descriptor
*
in_interrupt
;
struct
usb_endpoint_descriptor
*
in_interrupt
;
struct
urb
*
intr_urb
;
struct
urb
*
intr_urb
;
devfs_handle_t
devfs
;
int
subminor
;
/* which minor dev #? */
int
subminor
;
/* which minor dev #? */
...
@@ -374,16 +373,11 @@ brlvger_probe (struct usb_interface *intf,
...
@@ -374,16 +373,11 @@ brlvger_probe (struct usb_interface *intf,
dbg
(
"Display length: %d"
,
priv
->
plength
);
dbg
(
"Display length: %d"
,
priv
->
plength
);
sprintf
(
devfs_name
,
"usb/brlvger%d"
,
priv
->
subminor
);
sprintf
(
devfs_name
,
"usb/brlvger%d"
,
priv
->
subminor
);
priv
->
devfs
=
devfs_register
(
NULL
,
devfs_name
,
devfs_register
(
NULL
,
devfs_name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
BRLVGER_MINOR
+
priv
->
subminor
,
BRLVGER_MINOR
+
priv
->
subminor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
,
&
brlvger_fops
,
NULL
);
&
brlvger_fops
,
NULL
);
if
(
!
priv
->
devfs
)
{
#ifdef CONFIG_DEVFS_FS
err
(
"devfs node registration failed"
);
#endif
}
display_table
[
i
]
=
priv
;
display_table
[
i
]
=
priv
;
...
@@ -420,7 +414,7 @@ brlvger_disconnect(struct usb_interface *intf)
...
@@ -420,7 +414,7 @@ brlvger_disconnect(struct usb_interface *intf)
if
(
priv
){
if
(
priv
){
info
(
"Display %d disconnecting"
,
priv
->
subminor
);
info
(
"Display %d disconnecting"
,
priv
->
subminor
);
devfs_
unregister
(
priv
->
devfs
);
devfs_
remove
(
"usb/brlvger%d"
,
priv
->
subminor
);
usb_deregister_dev
(
1
,
priv
->
subminor
);
usb_deregister_dev
(
1
,
priv
->
subminor
);
down
(
&
disconnect_sem
);
down
(
&
disconnect_sem
);
...
...
drivers/usb/misc/rio500.c
View file @
36a674f3
...
@@ -65,7 +65,6 @@
...
@@ -65,7 +65,6 @@
struct
rio_usb_data
{
struct
rio_usb_data
{
struct
usb_device
*
rio_dev
;
/* init: probe_rio */
struct
usb_device
*
rio_dev
;
/* init: probe_rio */
devfs_handle_t
devfs
;
/* devfs device */
unsigned
int
ifnum
;
/* Interface number of the USB device */
unsigned
int
ifnum
;
/* Interface number of the USB device */
int
isopen
;
/* nz if open */
int
isopen
;
/* nz if open */
int
present
;
/* Device is present on the bus */
int
present
;
/* Device is present on the bus */
...
@@ -476,13 +475,11 @@ static int probe_rio(struct usb_interface *intf,
...
@@ -476,13 +475,11 @@ static int probe_rio(struct usb_interface *intf,
}
}
dbg
(
"probe_rio: ibuf address:%p"
,
rio
->
ibuf
);
dbg
(
"probe_rio: ibuf address:%p"
,
rio
->
ibuf
);
rio
->
devfs
=
devfs_register
(
NULL
,
"usb/rio500"
,
devfs_register
(
NULL
,
"usb/rio500"
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
RIO_MINOR
,
RIO_MINOR
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
,
&
usb_rio_fops
,
NULL
);
S_IWGRP
,
&
usb_rio_fops
,
NULL
);
if
(
rio
->
devfs
==
NULL
)
dbg
(
"probe_rio: device node registration failed"
);
init_MUTEX
(
&
(
rio
->
lock
));
init_MUTEX
(
&
(
rio
->
lock
));
...
@@ -496,7 +493,7 @@ static void disconnect_rio(struct usb_interface *intf)
...
@@ -496,7 +493,7 @@ static void disconnect_rio(struct usb_interface *intf)
usb_set_intfdata
(
intf
,
NULL
);
usb_set_intfdata
(
intf
,
NULL
);
if
(
rio
)
{
if
(
rio
)
{
devfs_
unregister
(
rio
->
devfs
);
devfs_
remove
(
"usb/rio500"
);
usb_deregister_dev
(
1
,
rio
->
minor
);
usb_deregister_dev
(
1
,
rio
->
minor
);
down
(
&
(
rio
->
lock
));
down
(
&
(
rio
->
lock
));
...
...
drivers/usb/usb-skeleton.c
View file @
36a674f3
...
@@ -98,7 +98,6 @@ MODULE_DEVICE_TABLE (usb, skel_table);
...
@@ -98,7 +98,6 @@ MODULE_DEVICE_TABLE (usb, skel_table);
struct
usb_skel
{
struct
usb_skel
{
struct
usb_device
*
udev
;
/* save off the usb device pointer */
struct
usb_device
*
udev
;
/* save off the usb device pointer */
struct
usb_interface
*
interface
;
/* the interface for this device */
struct
usb_interface
*
interface
;
/* the interface for this device */
devfs_handle_t
devfs
;
/* devfs device node */
unsigned
char
minor
;
/* the starting minor number for this device */
unsigned
char
minor
;
/* the starting minor number for this device */
unsigned
char
num_ports
;
/* the number of ports this device has */
unsigned
char
num_ports
;
/* the number of ports this device has */
char
num_interrupt_in
;
/* number of interrupt in endpoints we have */
char
num_interrupt_in
;
/* number of interrupt in endpoints we have */
...
@@ -610,7 +609,7 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
...
@@ -610,7 +609,7 @@ static int skel_probe(struct usb_interface *interface, const struct usb_device_i
/* initialize the devfs node for this device and register it */
/* initialize the devfs node for this device and register it */
sprintf
(
name
,
"usb/skel%d"
,
dev
->
minor
);
sprintf
(
name
,
"usb/skel%d"
,
dev
->
minor
);
dev
->
dev
fs
=
devfs_register
(
NULL
,
name
,
devfs
=
devfs_register
(
NULL
,
name
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
DEVFS_FL_DEFAULT
,
USB_MAJOR
,
dev
->
minor
,
dev
->
minor
,
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
...
@@ -674,7 +673,7 @@ static void skel_disconnect(struct usb_interface *interface)
...
@@ -674,7 +673,7 @@ static void skel_disconnect(struct usb_interface *interface)
minor
=
dev
->
minor
;
minor
=
dev
->
minor
;
/* remove our devfs node */
/* remove our devfs node */
devfs_
unregister
(
dev
->
devfs
);
devfs_
remove
(
"usb/skel%d"
,
dev
->
minor
);
/* give back our dynamic minor */
/* give back our dynamic minor */
usb_deregister_dev
(
1
,
minor
);
usb_deregister_dev
(
1
,
minor
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment