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
1bda0014
Commit
1bda0014
authored
Feb 27, 2003
by
Duncan Sands
Committed by
Greg Kroah-Hartman
Feb 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] USB speedtouch: handle usb_string failure
parent
533d1e0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
drivers/usb/misc/speedtouch.c
drivers/usb/misc/speedtouch.c
+4
-8
No files found.
drivers/usb/misc/speedtouch.c
View file @
1bda0014
...
@@ -892,7 +892,6 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i
...
@@ -892,7 +892,6 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i
int
ifnum
=
intf
->
altsetting
->
desc
.
bInterfaceNumber
;
int
ifnum
=
intf
->
altsetting
->
desc
.
bInterfaceNumber
;
struct
udsl_instance_data
*
instance
;
struct
udsl_instance_data
*
instance
;
unsigned
char
mac_str
[
13
];
unsigned
char
mac_str
[
13
];
unsigned
char
mac
[
6
];
int
i
,
length
;
int
i
,
length
;
char
*
buf
;
char
*
buf
;
...
@@ -995,13 +994,10 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i
...
@@ -995,13 +994,10 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i
instance
->
atm_dev
->
link_rate
=
128
*
1000
/
424
;
instance
->
atm_dev
->
link_rate
=
128
*
1000
/
424
;
/* set MAC address, it is stored in the serial number */
/* set MAC address, it is stored in the serial number */
usb_string
(
instance
->
usb_dev
,
instance
->
usb_dev
->
descriptor
.
iSerialNumber
,
mac_str
,
13
);
memset
(
instance
->
atm_dev
->
esi
,
0
,
sizeof
(
instance
->
atm_dev
->
esi
));
if
(
usb_string
(
dev
,
dev
->
descriptor
.
iSerialNumber
,
mac_str
,
sizeof
(
mac_str
))
==
12
)
for
(
i
=
0
;
i
<
6
;
i
++
)
for
(
i
=
0
;
i
<
6
;
i
++
)
mac
[
i
]
=
(
hex2int
(
mac_str
[
i
*
2
])
*
16
)
+
(
hex2int
(
mac_str
[
i
*
2
+
1
]));
instance
->
atm_dev
->
esi
[
i
]
=
(
hex2int
(
mac_str
[
i
*
2
])
*
16
)
+
(
hex2int
(
mac_str
[
i
*
2
+
1
]));
dbg
(
"MAC is %02x:%02x:%02x:%02x:%02x:%02x"
,
mac
[
0
],
mac
[
1
],
mac
[
2
],
mac
[
3
],
mac
[
4
],
mac
[
5
]);
memcpy
(
instance
->
atm_dev
->
esi
,
mac
,
6
);
/* device description */
/* device description */
buf
=
instance
->
description
;
buf
=
instance
->
description
;
...
...
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