ssize_t ret;
DECLARE_WAITQUEUE(wait, current);
- if ( ppos != &file->f_pos ) {
- return -ESPIPE;
- }
if ( !access_ok(VERIFY_READ, buffer, count) ) {
return -EFAULT;
}
ssize_t ret;
unsigned long int flags;
- if ( ppos != &file->f_pos ) {
- return -ESPIPE;
- }
if ( !access_ok(VERIFY_READ, buffer, count) ) {
return -EFAULT;
}
printk(KERN_INFO "usb-midi: Open Succeeded. minor= %d.\n", minor);
#endif
- return 0; /** Success. **/
+ return nonseekable_open(inode, file); /** Success. **/
}
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 &&
up(&open_sem);
wake_up(&open_wait);
- file->private_data = 0;
+ file->private_data = NULL;
return 0;
}
unsigned char jack2string[256];
#endif
- u = 0;
+ u = NULL;
/* find audiocontrol interface */
p1 = find_csinterface_descriptor( buffer, bufSize, NULL,
MS_HEADER, ifnum, altSetting);
if ( !u ) {
return NULL;
}
- u->deviceName = 0;
+ u->deviceName = NULL;
u->idVendor = d->descriptor.idVendor;
u->idProduct = d->descriptor.idProduct;
u->interface = ifnum;
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,
ifnum, altSetting );
if ( p2 && next && ( p2 > next ) )
- p2 = 0;
+ p2 = NULL;
if ( p1[0] < 9 || !p2 || p2[0] < 4 )
continue;
if ( ucable < 0 || ucable > 15 )
ucable = 0;
- u.deviceName = 0; /* A flag for alloc_usb_midi_device to get device name
- from device. */
+ u.deviceName = NULL; /* A flag for alloc_usb_midi_device to get device
+ name from device. */
u.idVendor = uvendor;
u.idProduct = uproduct;
u.interface = uinterface;