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
a0bca188
Commit
a0bca188
authored
Jul 12, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jul 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: drivers/usb NULL noise removal
parent
f92cc29d
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
163 additions
and
163 deletions
+163
-163
drivers/usb/class/usb-midi.c
drivers/usb/class/usb-midi.c
+8
-8
drivers/usb/gadget/epautoconf.c
drivers/usb/gadget/epautoconf.c
+3
-3
drivers/usb/gadget/ether.c
drivers/usb/gadget/ether.c
+22
-22
drivers/usb/gadget/file_storage.c
drivers/usb/gadget/file_storage.c
+1
-1
drivers/usb/gadget/inode.c
drivers/usb/gadget/inode.c
+16
-16
drivers/usb/gadget/net2280.c
drivers/usb/gadget/net2280.c
+28
-28
drivers/usb/gadget/zero.c
drivers/usb/gadget/zero.c
+10
-10
drivers/usb/host/ehci-dbg.c
drivers/usb/host/ehci-dbg.c
+1
-1
drivers/usb/host/ehci-sched.c
drivers/usb/host/ehci-sched.c
+6
-6
drivers/usb/host/ohci-dbg.c
drivers/usb/host/ohci-dbg.c
+3
-3
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hcd.c
+5
-5
drivers/usb/host/ohci-hub.c
drivers/usb/host/ohci-hub.c
+3
-3
drivers/usb/host/ohci-mem.c
drivers/usb/host/ohci-mem.c
+3
-3
drivers/usb/host/ohci-q.c
drivers/usb/host/ohci-q.c
+7
-7
drivers/usb/image/mdc800.c
drivers/usb/image/mdc800.c
+6
-6
drivers/usb/image/microtek.c
drivers/usb/image/microtek.c
+1
-1
drivers/usb/input/aiptek.c
drivers/usb/input/aiptek.c
+5
-5
drivers/usb/input/powermate.c
drivers/usb/input/powermate.c
+1
-1
drivers/usb/media/ov511.c
drivers/usb/media/ov511.c
+1
-1
drivers/usb/media/pwc-ctrl.c
drivers/usb/media/pwc-ctrl.c
+1
-1
drivers/usb/media/pwc-if.c
drivers/usb/media/pwc-if.c
+1
-1
drivers/usb/misc/auerswald.c
drivers/usb/misc/auerswald.c
+1
-1
drivers/usb/misc/speedtch.c
drivers/usb/misc/speedtch.c
+1
-1
drivers/usb/misc/usbtest.c
drivers/usb/misc/usbtest.c
+12
-12
drivers/usb/net/kaweth.c
drivers/usb/net/kaweth.c
+1
-1
drivers/usb/net/usbnet.c
drivers/usb/net/usbnet.c
+13
-13
drivers/usb/serial/keyspan.c
drivers/usb/serial/keyspan.c
+1
-1
drivers/usb/serial/kobil_sct.c
drivers/usb/serial/kobil_sct.c
+1
-1
drivers/usb/storage/sddr09.c
drivers/usb/storage/sddr09.c
+1
-1
No files found.
drivers/usb/class/usb-midi.c
View file @
a0bca188
...
...
@@ -951,7 +951,7 @@ static int usb_midi_release(struct inode *inode, struct file *file)
if
(
m
->
open_mode
&
FMODE_READ
)
{
unsigned
long
int
flagsep
;
spin_lock_irqsave
(
&
m
->
min
.
ep
->
lock
,
flagsep
);
m
->
min
.
ep
->
cables
[
m
->
min
.
cableId
]
=
0
;
// discard cable
m
->
min
.
ep
->
cables
[
m
->
min
.
cableId
]
=
NULL
;
// discard cable
m
->
min
.
ep
->
readers
-=
1
;
m
->
open_mode
&=
~
FMODE_READ
;
if
(
m
->
min
.
ep
->
readers
==
0
&&
...
...
@@ -967,7 +967,7 @@ static int usb_midi_release(struct inode *inode, struct file *file)
up
(
&
open_sem
);
wake_up
(
&
open_wait
);
file
->
private_data
=
0
;
file
->
private_data
=
NULL
;
return
0
;
}
...
...
@@ -1294,7 +1294,7 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
unsigned
char
jack2string
[
256
];
#endif
u
=
0
;
u
=
NULL
;
/* find audiocontrol interface */
p1
=
find_csinterface_descriptor
(
buffer
,
bufSize
,
NULL
,
MS_HEADER
,
ifnum
,
altSetting
);
...
...
@@ -1314,7 +1314,7 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
if
(
!
u
)
{
return
NULL
;
}
u
->
deviceName
=
0
;
u
->
deviceName
=
NULL
;
u
->
idVendor
=
d
->
descriptor
.
idVendor
;
u
->
idProduct
=
d
->
descriptor
.
idProduct
;
u
->
interface
=
ifnum
;
...
...
@@ -1388,7 +1388,7 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
if
(
quirks
==
0
)
{
/* MIDISTREAM */
p2
=
0
;
p2
=
NULL
;
for
(
p1
=
find_descriptor
(
buffer
,
bufSize
,
NULL
,
USB_DT_ENDPOINT
,
ifnum
,
altSetting
);
p1
;
p1
=
next
)
{
next
=
find_descriptor
(
buffer
,
bufSize
,
p1
,
USB_DT_ENDPOINT
,
...
...
@@ -1397,7 +1397,7 @@ static struct usb_midi_device *parse_descriptor( struct usb_device *d, unsigned
ifnum
,
altSetting
);
if
(
p2
&&
next
&&
(
p2
>
next
)
)
p2
=
0
;
p2
=
NULL
;
if
(
p1
[
0
]
<
9
||
!
p2
||
p2
[
0
]
<
4
)
continue
;
...
...
@@ -1940,8 +1940,8 @@ static int detect_by_hand(struct usb_device *d, unsigned int ifnum, struct usb_m
if
(
ucable
<
0
||
ucable
>
15
)
ucable
=
0
;
u
.
deviceName
=
0
;
/* A flag for alloc_usb_midi_device to get device nam
e
from device. */
u
.
deviceName
=
NULL
;
/* A flag for alloc_usb_midi_device to get devic
e
name
from device. */
u
.
idVendor
=
uvendor
;
u
.
idProduct
=
uproduct
;
u
.
interface
=
uinterface
;
...
...
drivers/usb/gadget/epautoconf.c
View file @
a0bca188
...
...
@@ -192,7 +192,7 @@ find_ep (struct usb_gadget *gadget, const char *name)
if
(
0
==
strcmp
(
ep
->
name
,
name
))
return
ep
;
}
return
0
;
return
NULL
;
}
/**
...
...
@@ -280,7 +280,7 @@ struct usb_ep * __init usb_ep_autoconfig (
}
/* Fail */
return
0
;
return
NULL
;
}
/**
...
...
@@ -297,7 +297,7 @@ void __init usb_ep_autoconfig_reset (struct usb_gadget *gadget)
struct
usb_ep
*
ep
;
list_for_each_entry
(
ep
,
&
gadget
->
ep_list
,
ep_list
)
{
ep
->
driver_data
=
0
;
ep
->
driver_data
=
NULL
;
}
#ifdef MANY_ENDPOINTS
in_epnum
=
0
;
...
...
drivers/usb/gadget/ether.c
View file @
a0bca188
...
...
@@ -685,7 +685,7 @@ static const struct usb_descriptor_header *fs_eth_function [10] = {
(
struct
usb_descriptor_header
*
)
&
data_intf
,
(
struct
usb_descriptor_header
*
)
&
fs_source_desc
,
(
struct
usb_descriptor_header
*
)
&
fs_sink_desc
,
0
,
NULL
,
#endif
/* DEV_CONFIG_CDC */
};
...
...
@@ -695,9 +695,9 @@ static inline void __init fs_subset_descriptors(void)
fs_eth_function
[
0
]
=
(
struct
usb_descriptor_header
*
)
&
subset_data_intf
;
fs_eth_function
[
1
]
=
(
struct
usb_descriptor_header
*
)
&
fs_source_desc
;
fs_eth_function
[
2
]
=
(
struct
usb_descriptor_header
*
)
&
fs_sink_desc
;
fs_eth_function
[
3
]
=
0
;
fs_eth_function
[
3
]
=
NULL
;
#else
fs_eth_function
[
0
]
=
0
;
fs_eth_function
[
0
]
=
NULL
;
#endif
}
...
...
@@ -714,7 +714,7 @@ static const struct usb_descriptor_header *fs_rndis_function [] = {
(
struct
usb_descriptor_header
*
)
&
rndis_data_intf
,
(
struct
usb_descriptor_header
*
)
&
fs_source_desc
,
(
struct
usb_descriptor_header
*
)
&
fs_sink_desc
,
0
,
NULL
,
};
#endif
...
...
@@ -780,7 +780,7 @@ static const struct usb_descriptor_header *hs_eth_function [10] = {
(
struct
usb_descriptor_header
*
)
&
data_intf
,
(
struct
usb_descriptor_header
*
)
&
hs_source_desc
,
(
struct
usb_descriptor_header
*
)
&
hs_sink_desc
,
0
,
NULL
,
#endif
/* DEV_CONFIG_CDC */
};
...
...
@@ -790,9 +790,9 @@ static inline void __init hs_subset_descriptors(void)
hs_eth_function
[
0
]
=
(
struct
usb_descriptor_header
*
)
&
subset_data_intf
;
hs_eth_function
[
1
]
=
(
struct
usb_descriptor_header
*
)
&
fs_source_desc
;
hs_eth_function
[
2
]
=
(
struct
usb_descriptor_header
*
)
&
fs_sink_desc
;
hs_eth_function
[
3
]
=
0
;
hs_eth_function
[
3
]
=
NULL
;
#else
hs_eth_function
[
0
]
=
0
;
hs_eth_function
[
0
]
=
NULL
;
#endif
}
...
...
@@ -809,7 +809,7 @@ static const struct usb_descriptor_header *hs_rndis_function [] = {
(
struct
usb_descriptor_header
*
)
&
rndis_data_intf
,
(
struct
usb_descriptor_header
*
)
&
hs_source_desc
,
(
struct
usb_descriptor_header
*
)
&
hs_sink_desc
,
0
,
NULL
,
};
#endif
...
...
@@ -1051,8 +1051,8 @@ set_ether_config (struct eth_dev *dev, int gfp_flags)
if
(
dev
->
status_ep
)
(
void
)
usb_ep_disable
(
dev
->
status_ep
);
#endif
dev
->
status_ep
=
0
;
dev
->
status
=
0
;
dev
->
status_ep
=
NULL
;
dev
->
status
=
NULL
;
#if defined(DEV_CONFIG_SUBSET) || defined(CONFIG_USB_ETH_RNDIS)
if
(
dev
->
rndis
||
!
dev
->
cdc
)
{
if
(
dev
->
in_ep
)
...
...
@@ -1061,10 +1061,10 @@ set_ether_config (struct eth_dev *dev, int gfp_flags)
(
void
)
usb_ep_disable
(
dev
->
out_ep
);
}
#endif
dev
->
in_ep
=
0
;
dev
->
in
=
0
;
dev
->
out_ep
=
0
;
dev
->
out
=
0
;
dev
->
in_ep
=
NULL
;
dev
->
in
=
NULL
;
dev
->
out_ep
=
NULL
;
dev
->
out
=
NULL
;
}
else
/* activate non-CDC configs right away
...
...
@@ -1111,7 +1111,7 @@ static void eth_reset_config (struct eth_dev *dev)
list_del
(
&
req
->
list
);
usb_ep_free_request
(
dev
->
in_ep
,
req
);
}
dev
->
in_ep
=
0
;
dev
->
in_ep
=
NULL
;
}
if
(
dev
->
out_ep
)
{
usb_ep_disable
(
dev
->
out_ep
);
...
...
@@ -1121,12 +1121,12 @@ static void eth_reset_config (struct eth_dev *dev)
list_del
(
&
req
->
list
);
usb_ep_free_request
(
dev
->
out_ep
,
req
);
}
dev
->
out_ep
=
0
;
dev
->
out_ep
=
NULL
;
}
if
(
dev
->
status_ep
)
{
usb_ep_disable
(
dev
->
status_ep
);
dev
->
status_ep
=
0
;
dev
->
status_ep
=
NULL
;
}
dev
->
config
=
0
;
}
...
...
@@ -1800,7 +1800,7 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req)
* use skb buffers.
*/
status
=
netif_rx
(
skb
);
skb
=
0
;
skb
=
NULL
;
break
;
/* software-driven interface shutdown */
...
...
@@ -1834,7 +1834,7 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req)
clean:
/* nobody reading rx_reqs, so no dev->lock */
list_add
(
&
req
->
list
,
&
dev
->
rx_reqs
);
req
=
0
;
req
=
NULL
;
}
if
(
req
)
rx_submit
(
dev
,
req
,
GFP_ATOMIC
);
...
...
@@ -1969,7 +1969,7 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
struct
eth_dev
*
dev
=
(
struct
eth_dev
*
)
net
->
priv
;
int
length
=
skb
->
len
;
int
retval
;
struct
usb_request
*
req
=
0
;
struct
usb_request
*
req
=
NULL
;
unsigned
long
flags
;
/* FIXME check dev->cdc_filter to decide whether to send this,
...
...
@@ -2212,7 +2212,7 @@ eth_unbind (struct usb_gadget *gadget)
dev
->
req
->
buf
,
dev
->
req
->
dma
,
USB_BUFSIZ
);
usb_ep_free_request
(
gadget
->
ep0
,
dev
->
req
);
dev
->
req
=
0
;
dev
->
req
=
NULL
;
}
unregister_netdev
(
dev
->
net
);
...
...
@@ -2220,7 +2220,7 @@ eth_unbind (struct usb_gadget *gadget)
/* assuming we used keventd, it must quiesce too */
flush_scheduled_work
();
set_gadget_data
(
gadget
,
0
);
set_gadget_data
(
gadget
,
NULL
);
}
static
u8
__init
nibble
(
unsigned
char
c
)
...
...
drivers/usb/gadget/file_storage.c
View file @
a0bca188
...
...
@@ -3673,7 +3673,7 @@ static void fsg_unbind(struct usb_gadget *gadget)
usb_ep_free_request
(
fsg
->
ep0
,
req
);
}
set_gadget_data
(
gadget
,
0
);
set_gadget_data
(
gadget
,
NULL
);
}
...
...
drivers/usb/gadget/inode.c
View file @
a0bca188
...
...
@@ -171,7 +171,7 @@ static struct dev_data *dev_new (void)
dev
=
kmalloc
(
sizeof
*
dev
,
GFP_KERNEL
);
if
(
!
dev
)
return
0
;
return
NULL
;
memset
(
dev
,
0
,
sizeof
*
dev
);
dev
->
state
=
STATE_DEV_DISABLED
;
atomic_set
(
&
dev
->
count
,
1
);
...
...
@@ -597,8 +597,8 @@ static void ep_aio_complete(struct usb_ep *ep, struct usb_request *req)
/* lock against disconnect (and ideally, cancel) */
spin_lock
(
&
epdata
->
dev
->
lock
);
priv
->
req
=
0
;
priv
->
epdata
=
0
;
priv
->
req
=
NULL
;
priv
->
epdata
=
NULL
;
if
(
NULL
==
iocb
->
ki_retry
||
unlikely
(
0
==
req
->
actual
)
||
unlikely
(
kiocbIsCancelled
(
iocb
)))
{
...
...
@@ -1204,7 +1204,7 @@ dev_release (struct inode *inode, struct file *fd)
fasync_helper
(
-
1
,
fd
,
0
,
&
dev
->
fasync
);
kfree
(
dev
->
buf
);
dev
->
buf
=
0
;
dev
->
buf
=
NULL
;
put_dev
(
dev
);
/* other endpoints were all decoupled from this device */
...
...
@@ -1356,7 +1356,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
req
->
buf
=
dev
->
rbuf
;
req
->
dma
=
DMA_ADDR_INVALID
;
req
->
context
=
0
;
req
->
context
=
NULL
;
value
=
-
EOPNOTSUPP
;
switch
(
ctrl
->
bRequest
)
{
...
...
@@ -1524,7 +1524,7 @@ static void destroy_ep_files (struct dev_data *dev)
ep
=
list_entry
(
entry
,
struct
ep_data
,
epfiles
);
list_del_init
(
&
ep
->
epfiles
);
dentry
=
ep
->
dentry
;
ep
->
dentry
=
0
;
ep
->
dentry
=
NULL
;
parent
=
dentry
->
d_parent
->
d_inode
;
/* break link to controller */
...
...
@@ -1532,7 +1532,7 @@ static void destroy_ep_files (struct dev_data *dev)
(
void
)
usb_ep_disable
(
ep
->
ep
);
ep
->
state
=
STATE_EP_UNBOUND
;
usb_ep_free_request
(
ep
->
ep
,
ep
->
req
);
ep
->
ep
=
0
;
ep
->
ep
=
NULL
;
wake_up
(
&
ep
->
wait
);
put_ep
(
ep
);
...
...
@@ -1612,8 +1612,8 @@ gadgetfs_unbind (struct usb_gadget *gadget)
spin_unlock_irq
(
&
dev
->
lock
);
destroy_ep_files
(
dev
);
gadget
->
ep0
->
driver_data
=
0
;
set_gadget_data
(
gadget
,
0
);
gadget
->
ep0
->
driver_data
=
NULL
;
set_gadget_data
(
gadget
,
NULL
);
/* we've already been disconnected ... no i/o is active */
if
(
dev
->
req
)
...
...
@@ -1646,7 +1646,7 @@ gadgetfs_bind (struct usb_gadget *gadget)
dev
->
req
=
usb_ep_alloc_request
(
gadget
->
ep0
,
GFP_KERNEL
);
if
(
!
dev
->
req
)
goto
enomem
;
dev
->
req
->
context
=
0
;
dev
->
req
->
context
=
NULL
;
dev
->
req
->
complete
=
epio_complete
;
if
(
activate_ep_files
(
dev
)
<
0
)
...
...
@@ -1835,7 +1835,7 @@ dev_config (struct file *fd, const char *buf, size_t len, loff_t *ptr)
value
=
usb_gadget_register_driver
(
&
gadgetfs_driver
);
if
(
value
!=
0
)
{
kfree
(
dev
->
buf
);
dev
->
buf
=
0
;
dev
->
buf
=
NULL
;
}
else
{
/* at this point "good" hardware has for the first time
* let the USB the host see us. alternatively, if users
...
...
@@ -1855,7 +1855,7 @@ dev_config (struct file *fd, const char *buf, size_t len, loff_t *ptr)
spin_unlock_irq
(
&
dev
->
lock
);
pr_debug
(
"%s: %s fail %Zd, %p
\n
"
,
shortname
,
__FUNCTION__
,
value
,
dev
);
kfree
(
dev
->
buf
);
dev
->
buf
=
0
;
dev
->
buf
=
NULL
;
return
value
;
}
...
...
@@ -1944,13 +1944,13 @@ gadgetfs_create_file (struct super_block *sb, char const *name,
qname
.
hash
=
full_name_hash
(
qname
.
name
,
qname
.
len
);
dentry
=
d_alloc
(
sb
->
s_root
,
&
qname
);
if
(
!
dentry
)
return
0
;
return
NULL
;
inode
=
gadgetfs_make_inode
(
sb
,
data
,
fops
,
S_IFREG
|
(
default_perm
&
S_IRWXUGO
));
if
(
!
inode
)
{
dput
(
dentry
);
return
0
;
return
NULL
;
}
d_add
(
dentry
,
inode
);
*
dentry_p
=
dentry
;
...
...
@@ -1980,7 +1980,7 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
/* root inode */
inode
=
gadgetfs_make_inode
(
sb
,
0
,
&
simple_dir_operations
,
NULL
,
&
simple_dir_operations
,
S_IFDIR
|
S_IRUGO
|
S_IXUGO
);
if
(
!
inode
)
return
-
ENOMEM
;
...
...
@@ -2027,7 +2027,7 @@ gadgetfs_kill_sb (struct super_block *sb)
kill_litter_super
(
sb
);
if
(
the_device
)
{
put_dev
(
the_device
);
the_device
=
0
;
the_device
=
NULL
;
}
}
...
...
drivers/usb/gadget/net2280.c
View file @
a0bca188
...
...
@@ -182,7 +182,7 @@ net2280_enable (struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
if
(
ep
->
dma
&&
(
max
%
4
)
!=
0
&&
use_dma_chaining
)
{
DEBUG
(
ep
->
dev
,
"%s, no dma for maxpacket %d
\n
"
,
ep
->
ep
.
name
,
ep
->
ep
.
maxpacket
);
ep
->
dma
=
0
;
ep
->
dma
=
NULL
;
}
/* set type, direction, address; reset fifo counters */
...
...
@@ -280,7 +280,7 @@ static void ep_reset (struct net2280_regs *regs, struct net2280_ep *ep)
{
u32
tmp
;
ep
->
desc
=
0
;
ep
->
desc
=
NULL
;
INIT_LIST_HEAD
(
&
ep
->
queue
);
ep
->
ep
.
maxpacket
=
~
0
;
...
...
@@ -374,12 +374,12 @@ net2280_alloc_request (struct usb_ep *_ep, int gfp_flags)
struct
net2280_request
*
req
;
if
(
!
_ep
)
return
0
;
return
NULL
;
ep
=
container_of
(
_ep
,
struct
net2280_ep
,
ep
);
req
=
kmalloc
(
sizeof
*
req
,
gfp_flags
);
if
(
!
req
)
return
0
;
return
NULL
;
memset
(
req
,
0
,
sizeof
*
req
);
req
->
req
.
dma
=
DMA_ADDR_INVALID
;
...
...
@@ -393,7 +393,7 @@ net2280_alloc_request (struct usb_ep *_ep, int gfp_flags)
&
req
->
td_dma
);
if
(
!
td
)
{
kfree
(
req
);
return
0
;
return
NULL
;
}
td
->
dmacount
=
0
;
/* not VALID */
td
->
dmaaddr
=
__constant_cpu_to_le32
(
DMA_ADDR_INVALID
);
...
...
@@ -463,7 +463,7 @@ net2280_alloc_buffer (
ep
=
container_of
(
_ep
,
struct
net2280_ep
,
ep
);
if
(
!
_ep
)
return
0
;
return
NULL
;
*
dma
=
DMA_ADDR_INVALID
;
#if defined(USE_KMALLOC)
...
...
@@ -530,7 +530,7 @@ write_fifo (struct net2280_ep *ep, struct usb_request *req)
total
=
req
->
length
-
req
->
actual
;
}
else
{
total
=
0
;
buf
=
0
;
buf
=
NULL
;
}
/* write just one packet at a time */
...
...
@@ -966,7 +966,7 @@ net2280_queue (struct usb_ep *_ep, struct usb_request *_req, int gfp_flags)
if
(
ep
->
num
==
0
)
allow_status
(
ep
);
/* don't queue it */
req
=
0
;
req
=
NULL
;
}
else
s
=
readl
(
&
ep
->
regs
->
ep_stat
);
}
...
...
@@ -1095,7 +1095,7 @@ static void restart_dma (struct net2280_ep *ep)
* OUT: was "usb-short", we must restart.
*/
if
(
ep
->
is_in
&&
!
req
->
valid
)
{
struct
net2280_request
*
entry
,
*
prev
=
0
;
struct
net2280_request
*
entry
,
*
prev
=
NULL
;
int
reqmode
,
done
=
0
;
DEBUG
(
ep
->
dev
,
"%s dma hiccup td %p
\n
"
,
ep
->
ep
.
name
,
req
->
td
);
...
...
@@ -1220,7 +1220,7 @@ static int net2280_dequeue (struct usb_ep *_ep, struct usb_request *_req)
DEBUG
(
ep
->
dev
,
"unlink (%s) pio
\n
"
,
_ep
->
name
);
done
(
ep
,
req
,
-
ECONNRESET
);
}
req
=
0
;
req
=
NULL
;
/* patch up hardware chaining data */
}
else
if
(
ep
->
dma
&&
use_dma_chaining
)
{
...
...
@@ -1957,15 +1957,15 @@ int usb_gadget_register_driver (struct usb_gadget_driver *driver)
dev
->
ep
[
i
].
irqs
=
0
;
/* hook up the driver ... */
driver
->
driver
.
bus
=
0
;
driver
->
driver
.
bus
=
NULL
;
dev
->
driver
=
driver
;
dev
->
gadget
.
dev
.
driver
=
&
driver
->
driver
;
retval
=
driver
->
bind
(
&
dev
->
gadget
);
if
(
retval
)
{
DEBUG
(
dev
,
"bind to driver %s --> %d
\n
"
,
driver
->
driver
.
name
,
retval
);
dev
->
driver
=
0
;
dev
->
gadget
.
dev
.
driver
=
0
;
dev
->
driver
=
NULL
;
dev
->
gadget
.
dev
.
driver
=
NULL
;
return
retval
;
}
...
...
@@ -1995,7 +1995,7 @@ stop_activity (struct net2280 *dev, struct usb_gadget_driver *driver)
/* don't disconnect if it's not connected */
if
(
dev
->
gadget
.
speed
==
USB_SPEED_UNKNOWN
)
driver
=
0
;
driver
=
NULL
;
/* stop hardware; prevent new request submissions;
* and kill any outstanding requests.
...
...
@@ -2029,8 +2029,8 @@ int usb_gadget_unregister_driver (struct usb_gadget_driver *driver)
spin_unlock_irqrestore
(
&
dev
->
lock
,
flags
);
driver
->
unbind
(
&
dev
->
gadget
);
dev
->
gadget
.
dev
.
driver
=
0
;
dev
->
driver
=
0
;
dev
->
gadget
.
dev
.
driver
=
NULL
;
dev
->
driver
=
NULL
;
net2280_led_active
(
dev
,
0
);
device_remove_file
(
&
dev
->
pdev
->
dev
,
&
dev_attr_function
);
...
...
@@ -2059,7 +2059,7 @@ static void handle_ep_small (struct net2280_ep *ep)
req
=
list_entry
(
ep
->
queue
.
next
,
struct
net2280_request
,
queue
);
else
req
=
0
;
req
=
NULL
;
/* ack all, and handle what we care about */
t
=
readl
(
&
ep
->
regs
->
ep_stat
);
...
...
@@ -2098,7 +2098,7 @@ static void handle_ep_small (struct net2280_ep *ep)
set_halt
(
ep
);
mode
=
2
;
}
else
if
(
!
req
&&
ep
->
stopped
)
write_fifo
(
ep
,
0
);
write_fifo
(
ep
,
NULL
);
}
}
else
{
/* status; stop NAKing */
...
...
@@ -2118,7 +2118,7 @@ static void handle_ep_small (struct net2280_ep *ep)
ep
->
stopped
=
1
;
if
(
req
)
done
(
ep
,
req
,
-
EOVERFLOW
);
req
=
0
;
req
=
NULL
;
}
}
}
...
...
@@ -2145,7 +2145,7 @@ static void handle_ep_small (struct net2280_ep *ep)
scan_dma_completions
(
ep
);
if
(
unlikely
(
list_empty
(
&
ep
->
queue
)
||
ep
->
out_overflow
))
{
req
=
0
;
req
=
NULL
;
break
;
}
req
=
list_entry
(
ep
->
queue
.
next
,
...
...
@@ -2159,7 +2159,7 @@ static void handle_ep_small (struct net2280_ep *ep)
count
&=
DMA_BYTE_COUNT_MASK
;
if
(
readl
(
&
ep
->
dma
->
dmadesc
)
!=
req
->
td_dma
)
req
=
0
;
req
=
NULL
;
break
;
}
udelay
(
1
);
...
...
@@ -2212,7 +2212,7 @@ static void handle_ep_small (struct net2280_ep *ep)
if
(
ep
->
num
==
0
)
{
/* wait for control status */
if
(
mode
!=
2
)
req
=
0
;
req
=
NULL
;
}
else
if
(
!
req
->
req
.
zero
||
len
!=
ep
->
ep
.
maxpacket
)
mode
=
2
;
}
...
...
@@ -2234,13 +2234,13 @@ static void handle_ep_small (struct net2280_ep *ep)
*/
if
(
!
ep
->
stopped
)
allow_status
(
ep
);
req
=
0
;
req
=
NULL
;
}
else
{
if
(
!
list_empty
(
&
ep
->
queue
)
&&
!
ep
->
stopped
)
req
=
list_entry
(
ep
->
queue
.
next
,
struct
net2280_request
,
queue
);
else
req
=
0
;
req
=
NULL
;
if
(
req
&&
!
ep
->
is_in
)
stop_out_naking
(
ep
);
}
...
...
@@ -2275,7 +2275,7 @@ get_ep_by_addr (struct net2280 *dev, u16 wIndex)
if
((
wIndex
&
0x0f
)
==
(
bEndpointAddress
&
0x0f
))
return
ep
;
}
return
0
;
return
NULL
;
}
static
void
handle_stat0_irqs
(
struct
net2280
*
dev
,
u32
stat
)
...
...
@@ -2707,11 +2707,11 @@ static void net2280_remove (struct pci_dev *pdev)
pci_disable_device
(
pdev
);
device_unregister
(
&
dev
->
gadget
.
dev
);
device_remove_file
(
&
pdev
->
dev
,
&
dev_attr_registers
);
pci_set_drvdata
(
pdev
,
0
);
pci_set_drvdata
(
pdev
,
NULL
);
INFO
(
dev
,
"unbind
\n
"
);
the_controller
=
0
;
the_controller
=
NULL
;
}
/* wrap this driver around the specified device, but
...
...
@@ -2722,7 +2722,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
{
struct
net2280
*
dev
;
unsigned
long
resource
,
len
;
void
*
base
=
0
;
void
*
base
=
NULL
;
int
retval
,
i
;
char
buf
[
8
],
*
bufp
;
...
...
drivers/usb/gadget/zero.c
View file @
a0bca188
...
...
@@ -305,14 +305,14 @@ static const struct usb_descriptor_header *fs_source_sink_function [] = {
(
struct
usb_descriptor_header
*
)
&
source_sink_intf
,
(
struct
usb_descriptor_header
*
)
&
fs_sink_desc
,
(
struct
usb_descriptor_header
*
)
&
fs_source_desc
,
0
,
NULL
,
};
static
const
struct
usb_descriptor_header
*
fs_loopback_function
[]
=
{
(
struct
usb_descriptor_header
*
)
&
loopback_intf
,
(
struct
usb_descriptor_header
*
)
&
fs_sink_desc
,
(
struct
usb_descriptor_header
*
)
&
fs_source_desc
,
0
,
NULL
,
};
#ifdef CONFIG_USB_GADGET_DUALSPEED
...
...
@@ -359,14 +359,14 @@ static const struct usb_descriptor_header *hs_source_sink_function [] = {
(
struct
usb_descriptor_header
*
)
&
source_sink_intf
,
(
struct
usb_descriptor_header
*
)
&
hs_source_desc
,
(
struct
usb_descriptor_header
*
)
&
hs_sink_desc
,
0
,
NULL
,
};
static
const
struct
usb_descriptor_header
*
hs_loopback_function
[]
=
{
(
struct
usb_descriptor_header
*
)
&
loopback_intf
,
(
struct
usb_descriptor_header
*
)
&
hs_source_desc
,
(
struct
usb_descriptor_header
*
)
&
hs_sink_desc
,
0
,
NULL
,
};
/* maxpacket and other transfer characteristics vary by speed. */
...
...
@@ -468,7 +468,7 @@ alloc_ep_req (struct usb_ep *ep, unsigned length)
&
req
->
dma
,
GFP_ATOMIC
);
if
(
!
req
->
buf
)
{
usb_ep_free_request
(
ep
,
req
);
req
=
0
;
req
=
NULL
;
}
}
return
req
;
...
...
@@ -599,7 +599,7 @@ source_sink_start_ep (struct usb_ep *ep, int gfp_flags)
req
=
alloc_ep_req
(
ep
,
buflen
);
if
(
!
req
)
return
0
;
return
NULL
;
memset
(
req
->
buf
,
0
,
req
->
length
);
req
->
complete
=
source_sink_complete
;
...
...
@@ -613,7 +613,7 @@ source_sink_start_ep (struct usb_ep *ep, int gfp_flags)
ERROR
(
dev
,
"start %s --> %d
\n
"
,
ep
->
name
,
status
);
free_ep_req
(
ep
,
req
);
req
=
0
;
req
=
NULL
;
}
return
req
;
...
...
@@ -804,11 +804,11 @@ static void zero_reset_config (struct zero_dev *dev)
*/
if
(
dev
->
in_ep
)
{
usb_ep_disable
(
dev
->
in_ep
);
dev
->
in_ep
=
0
;
dev
->
in_ep
=
NULL
;
}
if
(
dev
->
out_ep
)
{
usb_ep_disable
(
dev
->
out_ep
);
dev
->
out_ep
=
0
;
dev
->
out_ep
=
NULL
;
}
dev
->
config
=
0
;
}
...
...
@@ -1098,7 +1098,7 @@ zero_unbind (struct usb_gadget *gadget)
free_ep_req
(
gadget
->
ep0
,
dev
->
req
);
del_timer_sync
(
&
dev
->
resume
);
kfree
(
dev
);
set_gadget_data
(
gadget
,
0
);
set_gadget_data
(
gadget
,
NULL
);
}
static
int
...
...
drivers/usb/host/ehci-dbg.c
View file @
a0bca188
...
...
@@ -536,7 +536,7 @@ show_periodic (struct class_device *class_dev, char *buf)
if
(
p
.
qh
->
qh_next
.
ptr
)
temp
=
scnprintf
(
next
,
size
,
" ..."
);
p
.
ptr
=
0
;
p
.
ptr
=
NULL
;
break
;
}
/* show more info the first time around */
...
...
drivers/usb/host/ehci-sched.c
View file @
a0bca188
...
...
@@ -1499,7 +1499,7 @@ sitd_urb_transaction (
list_del
(
&
sitd
->
sitd_list
);
sitd_dma
=
sitd
->
sitd_dma
;
}
else
sitd
=
0
;
sitd
=
NULL
;
if
(
!
sitd
)
{
spin_unlock_irqrestore
(
&
ehci
->
lock
,
flags
);
...
...
@@ -1600,7 +1600,7 @@ sitd_link_urb (
hcd_to_bus
(
&
ehci
->
hcd
)
->
bandwidth_isoc_reqs
++
;
/* fill sITDs frame by frame */
for
(
packet
=
0
,
sitd
=
0
;
for
(
packet
=
0
,
sitd
=
NULL
;
packet
<
urb
->
number_of_packets
;
packet
++
)
{
...
...
@@ -1626,7 +1626,7 @@ sitd_link_urb (
/* don't need that schedule data any more */
iso_sched_free
(
stream
,
sched
);
urb
->
hcpriv
=
0
;
urb
->
hcpriv
=
NULL
;
timer_action
(
ehci
,
TIMER_IO_WATCHDOG
);
if
(
!
ehci
->
periodic_sched
++
)
...
...
@@ -1673,8 +1673,8 @@ sitd_complete (
}
usb_put_urb
(
urb
);
sitd
->
urb
=
0
;
sitd
->
stream
=
0
;
sitd
->
urb
=
NULL
;
sitd
->
stream
=
NULL
;
list_move
(
&
sitd
->
sitd_list
,
&
stream
->
free_list
);
stream
->
depth
-=
stream
->
interval
<<
3
;
iso_stream_put
(
ehci
,
stream
);
...
...
@@ -1691,7 +1691,7 @@ sitd_complete (
/* give urb back to the driver */
dev
=
usb_get_dev
(
urb
->
dev
);
ehci_urb_done
(
ehci
,
urb
,
regs
);
urb
=
0
;
urb
=
NULL
;
/* defer stopping schedule; completion can submit */
ehci
->
periodic_sched
--
;
...
...
drivers/usb/host/ohci-dbg.c
View file @
a0bca188
...
...
@@ -266,11 +266,11 @@ static void ohci_dump (struct ohci_hcd *controller, int verbose)
ohci_dbg
(
controller
,
"OHCI controller state
\n
"
);
// dumps some of the state we know about
ohci_dump_status
(
controller
,
NULL
,
0
);
ohci_dump_status
(
controller
,
NULL
,
NULL
);
if
(
controller
->
hcca
)
ohci_dbg
(
controller
,
"hcca frame #%04x
\n
"
,
OHCI_FRAME_NO
(
controller
->
hcca
));
ohci_dump_roothub
(
controller
,
1
,
NULL
,
0
);
ohci_dump_roothub
(
controller
,
1
,
NULL
,
NULL
);
}
static
const
char
data0
[]
=
"DATA0"
;
...
...
@@ -574,7 +574,7 @@ show_periodic (struct class_device *class_dev, char *buf)
}
else
{
/* we've seen it and what's after */
temp
=
0
;
ed
=
0
;
ed
=
NULL
;
}
}
while
(
ed
);
...
...
drivers/usb/host/ohci-hcd.c
View file @
a0bca188
...
...
@@ -229,7 +229,7 @@ static int ohci_urb_enqueue (
if
(
urb
->
status
!=
-
EINPROGRESS
)
{
spin_unlock
(
&
urb
->
lock
);
urb
->
hcpriv
=
urb_priv
;
finish_urb
(
ohci
,
urb
,
0
);
finish_urb
(
ohci
,
urb
,
NULL
);
retval
=
0
;
goto
fail
;
}
...
...
@@ -341,7 +341,7 @@ ohci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep)
if
(
!
HCD_IS_RUNNING
(
ohci
->
hcd
.
state
))
{
ed
->
state
=
ED_IDLE
;
finish_unlinks
(
ohci
,
0
,
0
);
finish_unlinks
(
ohci
,
0
,
NULL
);
}
switch
(
ed
->
state
)
{
...
...
@@ -369,7 +369,7 @@ ohci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep)
td_free
(
ohci
,
ed
->
dummy
);
break
;
}
dev
->
ep
[
epnum
]
=
0
;
dev
->
ep
[
epnum
]
=
NULL
;
done:
spin_unlock_irqrestore
(
&
ohci
->
lock
,
flags
);
return
;
...
...
@@ -728,7 +728,7 @@ static int hc_restart (struct ohci_hcd *ohci)
ed_deschedule
(
ohci
,
ed
);
ed
->
ed_next
=
ohci
->
ed_rm_list
;
ed
->
ed_prev
=
0
;
ed
->
ed_prev
=
NULL
;
ohci
->
ed_rm_list
=
ed
;
/* FALLTHROUGH */
case
ED_UNLINK
:
...
...
@@ -742,7 +742,7 @@ static int hc_restart (struct ohci_hcd *ohci)
urb
->
status
=
-
ESHUTDOWN
;
spin_unlock
(
&
urb
->
lock
);
}
finish_unlinks
(
ohci
,
0
,
0
);
finish_unlinks
(
ohci
,
0
,
NULL
);
spin_unlock_irq
(
&
ohci
->
lock
);
/* paranoia, in case that didn't work: */
...
...
drivers/usb/host/ohci-hub.c
View file @
a0bca188
...
...
@@ -123,11 +123,11 @@ static int ohci_hub_suspend (struct usb_hcd *hcd)
if
(
ohci_readl
(
&
ohci
->
regs
->
intrstatus
)
&
OHCI_INTR_SF
)
break
;
}
dl_done_list
(
ohci
,
0
);
dl_done_list
(
ohci
,
NULL
);
mdelay
(
7
);
}
dl_done_list
(
ohci
,
0
);
finish_unlinks
(
ohci
,
OHCI_FRAME_NO
(
ohci
->
hcca
),
0
);
dl_done_list
(
ohci
,
NULL
);
finish_unlinks
(
ohci
,
OHCI_FRAME_NO
(
ohci
->
hcca
),
NULL
);
writel
(
ohci_readl
(
&
ohci
->
regs
->
intrstatus
),
&
ohci
->
regs
->
intrstatus
);
/* maybe resume can wake root hub */
...
...
drivers/usb/host/ohci-mem.c
View file @
a0bca188
...
...
@@ -36,7 +36,7 @@ static struct usb_hcd *ohci_hcd_alloc (void)
INIT_WORK
(
&
ohci
->
rh_resume
,
ohci_rh_resume
,
&
ohci
->
hcd
);
return
&
ohci
->
hcd
;
}
return
0
;
return
NULL
;
}
static
void
ohci_hcd_free
(
struct
usb_hcd
*
hcd
)
...
...
@@ -69,11 +69,11 @@ static void ohci_mem_cleanup (struct ohci_hcd *ohci)
{
if
(
ohci
->
td_cache
)
{
dma_pool_destroy
(
ohci
->
td_cache
);
ohci
->
td_cache
=
0
;
ohci
->
td_cache
=
NULL
;
}
if
(
ohci
->
ed_cache
)
{
dma_pool_destroy
(
ohci
->
ed_cache
);
ohci
->
ed_cache
=
0
;
ohci
->
ed_cache
=
NULL
;
}
}
...
...
drivers/usb/host/ohci-q.c
View file @
a0bca188
...
...
@@ -174,8 +174,8 @@ static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
return
-
EAGAIN
;
ed
->
state
=
ED_OPER
;
ed
->
ed_prev
=
0
;
ed
->
ed_next
=
0
;
ed
->
ed_prev
=
NULL
;
ed
->
ed_next
=
NULL
;
ed
->
hwNextED
=
0
;
wmb
();
...
...
@@ -333,7 +333,7 @@ static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed)
if
(
ohci
->
ed_controltail
==
ed
)
{
ohci
->
ed_controltail
=
ed
->
ed_prev
;
if
(
ohci
->
ed_controltail
)
ohci
->
ed_controltail
->
ed_next
=
0
;
ohci
->
ed_controltail
->
ed_next
=
NULL
;
}
else
if
(
ed
->
ed_next
)
{
ed
->
ed_next
->
ed_prev
=
ed
->
ed_prev
;
}
...
...
@@ -357,7 +357,7 @@ static void ed_deschedule (struct ohci_hcd *ohci, struct ed *ed)
if
(
ohci
->
ed_bulktail
==
ed
)
{
ohci
->
ed_bulktail
=
ed
->
ed_prev
;
if
(
ohci
->
ed_bulktail
)
ohci
->
ed_bulktail
->
ed_next
=
0
;
ohci
->
ed_bulktail
->
ed_next
=
NULL
;
}
else
if
(
ed
->
ed_next
)
{
ed
->
ed_next
->
ed_prev
=
ed
->
ed_prev
;
}
...
...
@@ -412,7 +412,7 @@ static struct ed *ed_get (
if
(
!
td
)
{
/* out of memory */
ed_free
(
ohci
,
ed
);
ed
=
0
;
ed
=
NULL
;
goto
done
;
}
ed
->
dummy
=
td
;
...
...
@@ -474,7 +474,7 @@ static void start_ed_unlink (struct ohci_hcd *ohci, struct ed *ed)
/* rm_list is just singly linked, for simplicity */
ed
->
ed_next
=
ohci
->
ed_rm_list
;
ed
->
ed_prev
=
0
;
ed
->
ed_prev
=
NULL
;
ohci
->
ed_rm_list
=
ed
;
/* enable SOF interrupt */
...
...
@@ -950,7 +950,7 @@ finish_unlinks (struct ohci_hcd *ohci, u16 tick, struct pt_regs *regs)
* entries (which we'd ignore), but paranoia won't hurt.
*/
*
last
=
ed
->
ed_next
;
ed
->
ed_next
=
0
;
ed
->
ed_next
=
NULL
;
modified
=
0
;
/* unlink urbs as requested, but rescan the list after
...
...
drivers/usb/image/mdc800.c
View file @
a0bca188
...
...
@@ -190,7 +190,7 @@ static struct usb_endpoint_descriptor mdc800_ed [4] =
/* The Variable used by the driver */
static
struct
mdc800_data
*
mdc800
=
0
;
static
struct
mdc800_data
*
mdc800
;
/***************************************************************************
...
...
@@ -547,7 +547,7 @@ static void mdc800_usb_disconnect (struct usb_interface *intf)
usb_unlink_urb
(
mdc800
->
write_urb
);
usb_unlink_urb
(
mdc800
->
download_urb
);
mdc800
->
dev
=
0
;
mdc800
->
dev
=
NULL
;
usb_set_intfdata
(
intf
,
NULL
);
}
info
(
"Mustek MDC800 disconnected from USB."
);
...
...
@@ -971,9 +971,9 @@ static struct usb_driver mdc800_usb_driver =
Init and Cleanup this driver (Main Functions)
*************************************************************************/
#define try(A) if (
(A) == 0
) goto cleanup_on_fail;
#define try_free_mem(A) if (A
!= 0) { kfree (A); A=0
; }
#define try_free_urb(A) if (A
!= 0) { usb_free_urb (A); A=0
; }
#define try(A) if (
!(A)
) goto cleanup_on_fail;
#define try_free_mem(A) if (A
) { kfree (A); A=NULL
; }
#define try_free_urb(A) if (A
) { usb_free_urb (A); A=NULL
; }
static
int
__init
usb_mdc800_init
(
void
)
{
...
...
@@ -982,7 +982,7 @@ static int __init usb_mdc800_init (void)
try
(
mdc800
=
kmalloc
(
sizeof
(
struct
mdc800_data
),
GFP_KERNEL
));
memset
(
mdc800
,
0
,
sizeof
(
struct
mdc800_data
));
mdc800
->
dev
=
0
;
mdc800
->
dev
=
NULL
;
mdc800
->
open
=
0
;
mdc800
->
state
=
NOT_CONNECTED
;
init_MUTEX
(
&
mdc800
->
io_lock
);
...
...
drivers/usb/image/microtek.c
View file @
a0bca188
...
...
@@ -534,7 +534,7 @@ mts_build_transfer_context( Scsi_Cmnd *srb, struct mts_desc* desc )
if
(
!
srb
->
use_sg
)
{
if
(
!
srb
->
bufflen
){
desc
->
context
.
data
=
0
;
desc
->
context
.
data
=
NULL
;
desc
->
context
.
data_length
=
0
;
return
;
}
else
{
...
...
drivers/usb/input/aiptek.c
View file @
a0bca188
...
...
@@ -1324,7 +1324,7 @@ store_tabletXtilt(struct device *dev, const char *buf, size_t count)
if
(
strcmp
(
buf
,
"disable"
)
==
0
)
{
aiptek
->
newSetting
.
xTilt
=
AIPTEK_TILT_DISABLE
;
}
else
{
x
=
(
int
)
simple_strtol
(
buf
,
0
,
10
);
x
=
(
int
)
simple_strtol
(
buf
,
NULL
,
10
);
if
(
x
>=
AIPTEK_TILT_MIN
&&
x
<=
AIPTEK_TILT_MAX
)
{
aiptek
->
newSetting
.
xTilt
=
x
;
}
...
...
@@ -1366,7 +1366,7 @@ store_tabletYtilt(struct device *dev, const char *buf, size_t count)
if
(
strcmp
(
buf
,
"disable"
)
==
0
)
{
aiptek
->
newSetting
.
yTilt
=
AIPTEK_TILT_DISABLE
;
}
else
{
y
=
(
int
)
simple_strtol
(
buf
,
0
,
10
);
y
=
(
int
)
simple_strtol
(
buf
,
NULL
,
10
);
if
(
y
>=
AIPTEK_TILT_MIN
&&
y
<=
AIPTEK_TILT_MAX
)
{
aiptek
->
newSetting
.
yTilt
=
y
;
}
...
...
@@ -1399,7 +1399,7 @@ store_tabletJitterDelay(struct device *dev, const char *buf, size_t count)
if
(
aiptek
==
NULL
)
return
0
;
aiptek
->
newSetting
.
jitterDelay
=
(
int
)
simple_strtol
(
buf
,
0
,
10
);
aiptek
->
newSetting
.
jitterDelay
=
(
int
)
simple_strtol
(
buf
,
NULL
,
10
);
return
count
;
}
...
...
@@ -1430,7 +1430,7 @@ store_tabletProgrammableDelay(struct device *dev, const char *buf, size_t count)
if
(
aiptek
==
NULL
)
return
0
;
aiptek
->
newSetting
.
programmableDelay
=
(
int
)
simple_strtol
(
buf
,
0
,
10
);
aiptek
->
newSetting
.
programmableDelay
=
(
int
)
simple_strtol
(
buf
,
NULL
,
10
);
return
count
;
}
...
...
@@ -1805,7 +1805,7 @@ store_tabletWheel(struct device *dev, const char *buf, size_t count)
if
(
aiptek
==
NULL
)
return
0
;
aiptek
->
newSetting
.
wheel
=
(
int
)
simple_strtol
(
buf
,
0
,
10
);
aiptek
->
newSetting
.
wheel
=
(
int
)
simple_strtol
(
buf
,
NULL
,
10
);
return
count
;
}
...
...
drivers/usb/input/powermate.c
View file @
a0bca188
...
...
@@ -182,7 +182,7 @@ static void powermate_sync_state(struct powermate_device *pm)
pm
->
configcr
->
wLength
=
0
;
usb_fill_control_urb
(
pm
->
config
,
pm
->
udev
,
usb_sndctrlpipe
(
pm
->
udev
,
0
),
(
void
*
)
pm
->
configcr
,
0
,
0
,
(
void
*
)
pm
->
configcr
,
NULL
,
0
,
powermate_config_complete
,
pm
);
pm
->
config
->
setup_dma
=
pm
->
configcr_dma
;
pm
->
config
->
transfer_flags
|=
URB_NO_SETUP_DMA_MAP
;
...
...
drivers/usb/media/ov511.c
View file @
a0bca188
...
...
@@ -1900,7 +1900,7 @@ sensor_get_exposure(struct usb_ov511 *ov, unsigned char *val)
case
SEN_KS0127
:
case
SEN_KS0127B
:
case
SEN_SAA7111A
:
val
=
0
;
val
=
NULL
;
PDEBUG
(
3
,
"Unsupported with this sensor"
);
return
-
EPERM
;
default:
...
...
drivers/usb/media/pwc-ctrl.c
View file @
a0bca188
...
...
@@ -359,7 +359,7 @@ static inline int set_video_mode_Timon(struct pwc_device *pdev, int size, int fr
static
inline
int
set_video_mode_Kiara
(
struct
pwc_device
*
pdev
,
int
size
,
int
frames
,
int
compression
,
int
snapshot
)
{
struct
Kiara_table_entry
*
pChoose
=
0
;
struct
Kiara_table_entry
*
pChoose
=
NULL
;
int
fps
,
ret
;
unsigned
char
buf
[
12
];
struct
Kiara_table_entry
RawEntry
=
{
6
,
773
,
1272
,
{
0xAD
,
0xF4
,
0x10
,
0x27
,
0xB6
,
0x24
,
0x96
,
0x02
,
0x30
,
0x05
,
0x03
,
0x80
}};
...
...
drivers/usb/media/pwc-if.c
View file @
a0bca188
...
...
@@ -593,7 +593,7 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs)
int
i
,
fst
,
flen
;
int
awake
;
struct
pwc_frame_buf
*
fbuf
;
unsigned
char
*
fillptr
=
0
,
*
iso_buf
=
0
;
unsigned
char
*
fillptr
=
NULL
,
*
iso_buf
=
NULL
;
awake
=
0
;
pdev
=
(
struct
pwc_device
*
)
urb
->
context
;
...
...
drivers/usb/misc/auerswald.c
View file @
a0bca188
...
...
@@ -699,7 +699,7 @@ static int auerchain_control_msg (pauerchain_t acp, struct usb_device *dev, unsi
dr
->
wLength
=
cpu_to_le16
(
size
);
usb_fill_control_urb
(
urb
,
dev
,
pipe
,
(
unsigned
char
*
)
dr
,
data
,
size
,
/* build urb */
auerchain_blocking_completion
,
0
);
auerchain_blocking_completion
,
NULL
);
ret
=
auerchain_start_wait_urb
(
acp
,
urb
,
timeout
,
&
length
);
usb_free_urb
(
urb
);
...
...
drivers/usb/misc/speedtch.c
View file @
a0bca188
...
...
@@ -1149,7 +1149,7 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i
}
/* ATM init */
if
(
!
(
instance
->
atm_dev
=
atm_dev_register
(
udsl_driver_name
,
&
udsl_atm_devops
,
-
1
,
0
)))
{
if
(
!
(
instance
->
atm_dev
=
atm_dev_register
(
udsl_driver_name
,
&
udsl_atm_devops
,
-
1
,
NULL
)))
{
dbg
(
"udsl_usb_probe: failed to register ATM device!"
);
goto
fail
;
}
...
...
drivers/usb/misc/usbtest.c
View file @
a0bca188
...
...
@@ -121,8 +121,8 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf)
for
(
tmp
=
0
;
tmp
<
intf
->
num_altsetting
;
tmp
++
)
{
unsigned
ep
;
in
=
out
=
0
;
iso_in
=
iso_out
=
0
;
in
=
out
=
NULL
;
iso_in
=
iso_out
=
NULL
;
alt
=
intf
->
altsetting
+
tmp
;
/* take the first altsetting with in-bulk + out-bulk;
...
...
@@ -216,11 +216,11 @@ static struct urb *simple_alloc_urb (
struct
urb
*
urb
;
if
(
bytes
<
0
)
return
0
;
return
NULL
;
urb
=
usb_alloc_urb
(
0
,
SLAB_KERNEL
);
if
(
!
urb
)
return
urb
;
usb_fill_bulk_urb
(
urb
,
udev
,
pipe
,
0
,
bytes
,
simple_callback
,
0
);
usb_fill_bulk_urb
(
urb
,
udev
,
pipe
,
NULL
,
bytes
,
simple_callback
,
NULL
);
urb
->
interval
=
(
udev
->
speed
==
USB_SPEED_HIGH
)
?
(
INTERRUPT_RATE
<<
3
)
:
INTERRUPT_RATE
;
...
...
@@ -231,7 +231,7 @@ static struct urb *simple_alloc_urb (
&
urb
->
transfer_dma
);
if
(
!
urb
->
transfer_buffer
)
{
usb_free_urb
(
urb
);
urb
=
0
;
urb
=
NULL
;
}
else
memset
(
urb
->
transfer_buffer
,
0
,
bytes
);
return
urb
;
...
...
@@ -380,7 +380,7 @@ alloc_sglist (int nents, int max, int vary)
sg
=
kmalloc
(
nents
*
sizeof
*
sg
,
SLAB_KERNEL
);
if
(
!
sg
)
return
0
;
return
NULL
;
memset
(
sg
,
0
,
nents
*
sizeof
*
sg
);
for
(
i
=
0
;
i
<
nents
;
i
++
)
{
...
...
@@ -389,7 +389,7 @@ alloc_sglist (int nents, int max, int vary)
buf
=
kmalloc
(
size
,
SLAB_KERNEL
);
if
(
!
buf
)
{
free_sglist
(
sg
,
i
);
return
0
;
return
NULL
;
}
memset
(
buf
,
0
,
size
);
...
...
@@ -637,7 +637,7 @@ static int ch9_postconfig (struct usbtest_dev *dev)
/* and sometimes [9.2.6.6] speed dependent descriptors */
if
(
udev
->
descriptor
.
bcdUSB
==
0x0200
)
{
/* pre-swapped */
struct
usb_qualifier_descriptor
*
d
=
0
;
struct
usb_qualifier_descriptor
*
d
=
NULL
;
/* device qualifier [9.6.2] */
retval
=
usb_get_descriptor
(
udev
,
...
...
@@ -817,11 +817,11 @@ static void ctrl_complete (struct urb *urb, struct pt_regs *regs)
if
((
status
=
usb_submit_urb
(
urb
,
SLAB_ATOMIC
))
!=
0
)
{
dbg
(
"can't resubmit ctrl %02x.%02x, err %d"
,
reqp
->
bRequestType
,
reqp
->
bRequest
,
status
);
urb
->
dev
=
0
;
urb
->
dev
=
NULL
;
}
else
ctx
->
pending
++
;
}
else
urb
->
dev
=
0
;
urb
->
dev
=
NULL
;
/* signal completion when nothing's queued */
if
(
ctx
->
pending
==
0
)
...
...
@@ -1368,7 +1368,7 @@ static struct urb *iso_alloc_urb (
unsigned
i
,
maxp
,
packets
;
if
(
bytes
<
0
||
!
desc
)
return
0
;
return
NULL
;
maxp
=
0x7ff
&
desc
->
wMaxPacketSize
;
maxp
*=
1
+
(
0x3
&
(
desc
->
wMaxPacketSize
>>
11
));
packets
=
(
bytes
+
maxp
-
1
)
/
maxp
;
...
...
@@ -1385,7 +1385,7 @@ static struct urb *iso_alloc_urb (
&
urb
->
transfer_dma
);
if
(
!
urb
->
transfer_buffer
)
{
usb_free_urb
(
urb
);
return
0
;
return
NULL
;
}
memset
(
urb
->
transfer_buffer
,
0
,
bytes
);
for
(
i
=
0
;
i
<
packets
;
i
++
)
{
...
...
drivers/usb/net/kaweth.c
View file @
a0bca188
...
...
@@ -1293,7 +1293,7 @@ static int kaweth_internal_control_msg(struct usb_device *usb_dev,
return
-
ENOMEM
;
usb_fill_control_urb
(
urb
,
usb_dev
,
pipe
,
(
unsigned
char
*
)
cmd
,
data
,
len
,
usb_api_blocking_completion
,
0
);
len
,
usb_api_blocking_completion
,
NULL
);
retv
=
usb_start_wait_urb
(
urb
,
timeout
,
&
length
);
if
(
retv
<
0
)
{
...
...
drivers/usb/net/usbnet.c
View file @
a0bca188
...
...
@@ -316,7 +316,7 @@ get_endpoints (struct usbnet *dev, struct usb_interface *intf)
for
(
tmp
=
0
;
tmp
<
intf
->
num_altsetting
;
tmp
++
)
{
unsigned
ep
;
in
=
out
=
0
;
in
=
out
=
NULL
;
alt
=
intf
->
altsetting
+
tmp
;
/* take the first altsetting with in-bulk + out-bulk;
...
...
@@ -1086,7 +1086,7 @@ static void cdc_unbind (struct usbnet *dev, struct usb_interface *intf)
/* ensure immediate exit from usbnet_disconnect */
usb_set_intfdata
(
info
->
data
,
NULL
);
usb_driver_release_interface
(
&
usbnet_driver
,
info
->
data
);
info
->
data
=
0
;
info
->
data
=
NULL
;
}
/* and vice versa (just in case) */
...
...
@@ -1094,7 +1094,7 @@ static void cdc_unbind (struct usbnet *dev, struct usb_interface *intf)
/* ensure immediate exit from usbnet_disconnect */
usb_set_intfdata
(
info
->
control
,
NULL
);
usb_driver_release_interface
(
&
usbnet_driver
,
info
->
control
);
info
->
control
=
0
;
info
->
control
=
NULL
;
}
}
...
...
@@ -1641,7 +1641,7 @@ nc_vendor_write (struct usbnet *dev, u8 req, u8 regnum, u16 value)
req
,
USB_DIR_OUT
|
USB_TYPE_VENDOR
|
USB_RECIP_DEVICE
,
value
,
regnum
,
0
,
0
,
// data is in setup packet
NULL
,
0
,
// data is in setup packet
CONTROL_TIMEOUT_JIFFIES
);
}
...
...
@@ -2084,7 +2084,7 @@ pl_vendor_req (struct usbnet *dev, u8 req, u8 val, u8 index)
req
,
USB_DIR_IN
|
USB_TYPE_VENDOR
|
USB_RECIP_DEVICE
,
val
,
index
,
0
,
0
,
NULL
,
0
,
CONTROL_TIMEOUT_JIFFIES
);
}
...
...
@@ -2418,7 +2418,7 @@ static void rx_complete (struct urb *urb, struct pt_regs *regs)
skb_put
(
skb
,
urb
->
actual_length
);
entry
->
state
=
rx_done
;
entry
->
urb
=
0
;
entry
->
urb
=
NULL
;
switch
(
urb_status
)
{
// success
...
...
@@ -2462,7 +2462,7 @@ static void rx_complete (struct urb *urb, struct pt_regs *regs)
block:
entry
->
state
=
rx_cleanup
;
entry
->
urb
=
urb
;
urb
=
0
;
urb
=
NULL
;
break
;
// data overrun ... flush fifo?
...
...
@@ -2557,7 +2557,7 @@ static int usbnet_stop (struct net_device *net)
schedule_timeout
(
UNLINK_TIMEOUT_JIFFIES
);
devdbg
(
dev
,
"waited for %d urb completions"
,
temp
);
}
dev
->
wait
=
0
;
dev
->
wait
=
NULL
;
remove_wait_queue
(
&
unlink_wakeup
,
&
wait
);
/* deferred work (task, timer, softirq) must also stop.
...
...
@@ -2716,7 +2716,7 @@ kevent (void *data)
/* tasklet could resubmit itself forever if memory is tight */
if
(
test_bit
(
EVENT_RX_MEMORY
,
&
dev
->
flags
))
{
struct
urb
*
urb
=
0
;
struct
urb
*
urb
=
NULL
;
if
(
netif_running
(
dev
->
net
))
urb
=
usb_alloc_urb
(
0
,
GFP_KERNEL
);
...
...
@@ -2771,7 +2771,7 @@ static void tx_complete (struct urb *urb, struct pt_regs *regs)
}
}
urb
->
dev
=
0
;
urb
->
dev
=
NULL
;
entry
->
state
=
tx_done
;
defer_bh
(
dev
,
skb
);
}
...
...
@@ -2795,13 +2795,13 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)
struct
usbnet
*
dev
=
(
struct
usbnet
*
)
net
->
priv
;
int
length
;
int
retval
=
NET_XMIT_SUCCESS
;
struct
urb
*
urb
=
0
;
struct
urb
*
urb
=
NULL
;
struct
skb_data
*
entry
;
struct
driver_info
*
info
=
dev
->
driver_info
;
unsigned
long
flags
;
#ifdef CONFIG_USB_NET1080
struct
nc_header
*
header
=
0
;
struct
nc_trailer
*
trailer
=
0
;
struct
nc_header
*
header
=
NULL
;
struct
nc_trailer
*
trailer
=
NULL
;
#endif
/* CONFIG_USB_NET1080 */
// some devices want funky USB-level framing, for
...
...
drivers/usb/serial/keyspan.c
View file @
a0bca188
...
...
@@ -1175,7 +1175,7 @@ static void keyspan_close(struct usb_serial_port *port, struct file *filp)
stop_urb
(
p_priv
->
out_urbs
[
i
]);
}
}
port
->
tty
=
0
;
port
->
tty
=
NULL
;
}
...
...
drivers/usb/serial/kobil_sct.c
View file @
a0bca188
...
...
@@ -361,7 +361,7 @@ static void kobil_close (struct usb_serial_port *port, struct file *filp)
if
(
port
->
write_urb
){
usb_unlink_urb
(
port
->
write_urb
);
usb_free_urb
(
port
->
write_urb
);
port
->
write_urb
=
0
;
port
->
write_urb
=
NULL
;
}
if
(
port
->
interrupt_in_urb
){
usb_unlink_urb
(
port
->
interrupt_in_urb
);
...
...
drivers/usb/storage/sddr09.c
View file @
a0bca188
...
...
@@ -1089,7 +1089,7 @@ sddr09_get_cardinfo(struct us_data *us, unsigned char flags) {
if
(
result
!=
USB_STOR_TRANSPORT_GOOD
)
{
US_DEBUGP
(
"Result of read_deviceID is %d
\n
"
,
result
);
printk
(
"sddr09: could not read card info
\n
"
);
return
0
;
return
NULL
;
}
sprintf
(
blurbtxt
,
"sddr09: Found Flash card, ID = %02X %02X %02X %02X"
,
...
...
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