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
b13c691e
Commit
b13c691e
authored
Jun 10, 2002
by
David S. Miller
Committed by
David S. Miller
Jun 10, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] Warning fix
DEVICE_ID_SIZE clashes with the define in include/linux/device.h
parent
7c8f455e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/usb/class/printer.c
drivers/usb/class/printer.c
+5
-5
No files found.
drivers/usb/class/printer.c
View file @
b13c691e
...
...
@@ -64,7 +64,7 @@
#define DRIVER_DESC "USB Printer Device Class driver"
#define USBLP_BUF_SIZE 8192
#define
DEVICE_ID_SIZE
1024
#define
USBLP_DEVICE_ID_SIZE
1024
/* ioctls: */
#define LPGETSTATUS 0x060b
/* same as in drivers/char/lp.c */
...
...
@@ -839,7 +839,7 @@ static void *usblp_probe(struct usb_device *dev, unsigned int ifnum,
/* Malloc device ID string buffer to the largest expected length,
* since we can re-query it on an ioctl and a dynamic string
* could change in length. */
if
(
!
(
usblp
->
device_id_string
=
kmalloc
(
DEVICE_ID_SIZE
,
GFP_KERNEL
)))
{
if
(
!
(
usblp
->
device_id_string
=
kmalloc
(
USBLP_
DEVICE_ID_SIZE
,
GFP_KERNEL
)))
{
err
(
"out of memory for device_id_string"
);
goto
abort_minor
;
}
...
...
@@ -1045,7 +1045,7 @@ static int usblp_cache_device_id_string(struct usblp *usblp)
{
int
err
,
length
;
err
=
usblp_get_id
(
usblp
,
0
,
usblp
->
device_id_string
,
DEVICE_ID_SIZE
-
1
);
err
=
usblp_get_id
(
usblp
,
0
,
usblp
->
device_id_string
,
USBLP_
DEVICE_ID_SIZE
-
1
);
if
(
err
<
0
)
{
dbg
(
"usblp%d: error = %d reading IEEE-1284 Device ID string"
,
usblp
->
minor
,
err
);
...
...
@@ -1059,8 +1059,8 @@ static int usblp_cache_device_id_string(struct usblp *usblp)
length
=
(
usblp
->
device_id_string
[
0
]
<<
8
)
+
usblp
->
device_id_string
[
1
];
if
(
length
<
2
)
length
=
2
;
else
if
(
length
>=
DEVICE_ID_SIZE
)
length
=
DEVICE_ID_SIZE
-
1
;
else
if
(
length
>=
USBLP_
DEVICE_ID_SIZE
)
length
=
USBLP_
DEVICE_ID_SIZE
-
1
;
usblp
->
device_id_string
[
length
]
=
'\0'
;
dbg
(
"usblp%d Device ID string [len=%d]=
\"
%s
\"
"
,
...
...
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