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
Kirill Smelkov
linux
Commits
3a672820
Commit
3a672820
authored
May 06, 2003
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB: converted mdc800 over to new usb_register_dev() changes.
parent
171e95fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
drivers/usb/image/mdc800.c
drivers/usb/image/mdc800.c
+10
-7
No files found.
drivers/usb/image/mdc800.c
View file @
3a672820
...
...
@@ -118,12 +118,8 @@
#define TO_READ_FROM_IRQ TO_DEFAULT_COMMAND
#define TO_GET_READY TO_DEFAULT_COMMAND
#ifdef CONFIG_USB_DYNAMIC_MINORS
#define MDC800_DEVICE_MINOR_BASE 0
#else
/* Minor Number of the device (create with mknod /dev/mustek c 180 32) */
#define MDC800_DEVICE_MINOR_BASE 32
#endif
/**************************************************************************
...
...
@@ -401,6 +397,13 @@ static void mdc800_usb_download_notify (struct urb *urb, struct pt_regs *res)
static
struct
usb_driver
mdc800_usb_driver
;
static
struct
file_operations
mdc800_device_ops
;
static
struct
usb_class_driver
mdc800_class
=
{
.
name
=
"usb/mdc800%d"
,
.
fops
=
&
mdc800_device_ops
,
.
mode
=
S_IFCHR
|
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
,
.
minor_base
=
MDC800_DEVICE_MINOR_BASE
,
};
/*
* Callback to search the Mustek MDC800 on the USB Bus
...
...
@@ -477,8 +480,8 @@ static int mdc800_usb_probe (struct usb_interface *intf,
down
(
&
mdc800
->
io_lock
);
retval
=
usb_register_dev
(
&
mdc800_device_ops
,
MDC800_DEVICE_MINOR_BASE
,
1
,
&
mdc800
->
minor
);
if
(
retval
&&
(
retval
!=
-
ENODEV
)
)
{
retval
=
usb_register_dev
(
intf
,
&
mdc800_class
);
if
(
retval
)
{
err
(
"Not able to get a minor for this device."
);
return
-
ENODEV
;
}
...
...
@@ -540,7 +543,7 @@ static void mdc800_usb_disconnect (struct usb_interface *intf)
if
(
mdc800
->
state
==
NOT_CONNECTED
)
return
;
usb_deregister_dev
(
1
,
mdc800
->
minor
);
usb_deregister_dev
(
intf
,
&
mdc800_class
);
mdc800
->
state
=
NOT_CONNECTED
;
...
...
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