static int yurex_fasync(int fd, struct file *file, int on) { struct usb_yurex *dev; dev = (struct usb_yurex *)file->private_data; return fasync_helper(fd, file, on, &dev->async_queue); }
static int scull_fasync(int fd, struct file *filp, int mode) { struct scull_dev *dev = filp->private_data; printk(KERN_DEBUG"fasync caller\n"); return fasync_helper(fd, filp, mode, &dev->async_queue); }
/* * fasync file op */ static int hiddev_fasync(int fd, struct file *file, int on) { int retval; struct hiddev_list *list = file->private_data; retval = fasync_helper(fd, file, on, &list->fasync); return retval < 0 ? retval : 0; }
static int uio_fasync(int fd, struct file *filep, int on) { struct uio_listener *listener = filep->private_data; struct uio_device *idev = listener->dev; return fasync_helper(fd, filep, on, &idev->async_queue); }
static int scull_p_fasync_sz(int fd, struct file *filp, int mode) { printk(KERN_ALERT "%s enter\n", __func__); scull_pipe_sz *dev = filp->private_data; return fasync_helper(fd, filp, mode, &dev->async_queue); }
static int tun_chr_fasync(int fd, struct file *file, int on) { struct tun_struct *tun = (struct tun_struct *)file->private_data; int ret; if (!tun) return -EBADFD; DBG(KERN_INFO "%s: tun_chr_fasync %d\n", tun->name, on); if ((ret = fasync_helper(fd, file, on, &tun->fasync)) < 0) return ret; if (on) { tun->flags |= TUN_FASYNC; if (!file->f_owner.pid) { file->f_owner.pid = current->pid; file->f_owner.uid = current->uid; file->f_owner.euid = current->euid; } } else tun->flags &= ~TUN_FASYNC; return 0; }
static int lis3lv02d_misc_release(struct inode *inode, struct file *file) { fasync_helper(-1, file, 0, &lis3_dev.async_queue); free_irq(lis3_dev.irq, &lis3_dev); clear_bit(0, &lis3_dev.misc_opened); /* release the device */ return 0; }
static int xts_fasync(int fd, struct file *filp, int on) { struct xts_dev *dev = filp->private_data; return fasync_helper(fd, filp, on, &dev->fasync); }
static int fasync_mouse(int fd, struct file *filp, int on) { int retval; retval = fasync_helper(fd, filp, on, &mouse.fasyncptr); if (retval < 0) return retval; return 0; }
static int hsi_char_fasync(int fd, struct file *file, int on) { int ch = (int)file->private_data; if (fasync_helper(fd, file, on, &hsi_char_data[ch].async_queue) >= 0) return 0; else return -EIO; }
static int lis3lv02d_misc_release(struct inode *inode, struct file *file) { fasync_helper(-1, file, 0, &lis3_dev.async_queue); clear_bit(0, &lis3_dev.misc_opened); /* release the device */ if (lis3_dev.pm_dev) pm_runtime_put(lis3_dev.pm_dev); return 0; }
static int ipmi_fasync(int fd, struct file *file, int on) { int result; result = fasync_helper(fd, file, on, &fasync_q); return (result); }
static int servicer_fasync(int fd, struct file *filp, int on) { int retval; retval = fasync_helper(fd, filp, on, &fasync_queue); if(retval < 0) return retval; return 0; }
/* Asynchronous notification will be used to send SIGIO signal to user process Add kill_fasync(struct fasync_struct ** , int signo , int band); used to send signal along with the operation to be performed in the user process e.g, use in read or write signo will be SIGIO and band is POLL_IN for read POLL_OUT for write */ static int hv_cdev_fasync(int fd , struct file *filp , int mode) { hv_cdev_private *priv; priv = filp->private_data; return fasync_helper(fd , filp , mode , &priv->fasync); }
static int scull_release(struct inode *inode, struct file *filp) { struct scull_dev *tmp1; tmp1 = filp->private_data; if (tmp1->faq) fasync_helper(-1, filp, 0, &tmp1->faq); return 0; }
static int fasync_aux(int fd, struct file *filp, int on) { int retval; retval = fasync_helper(fd, filp, on, &queue->fasync); if (retval < 0) return retval; return 0; }
static int pfs168_spi_fasync(int fd, struct file *filp, int on) { int retval; DPRINTK("pfs168_spi_fasync()\n"); retval = fasync_helper(fd, filp, on, &rxq->fasync); if (retval < 0) return retval; return 0; }
static int sun_mouse_fasync (int fd, struct file *filp, int on) { int retval; retval = fasync_helper (fd, filp, on, &sunmouse.fasync); if (retval < 0) return retval; return 0; }
static int ipmi_fasync(int fd, struct file *file, int on) { struct ipmi_file_private *priv = file->private_data; int result; result = fasync_helper(fd, file, on, &priv->fasync_queue); return (result); }
static int misc_modem_release(struct inode *inode, struct file *filp) { struct viatel_modem_data *d = (struct viatel_modem_data *)(filp->private_data); if(atomic_read(&vmdata->count) > 0){ atomic_dec(&vmdata->count); } return fasync_helper(-1, filp, 0, &d->fasync); }
/* Needed by X */ static int kbd_fasync (int fd, struct file *filp, int on) { int retval; retval = fasync_helper (fd, filp, on, &kb_fasync); if (retval < 0) return retval; return 0; }
static int hsi_char_fasync(int fd, struct file *file, int on) { struct hsi_char_channel *channel = file->private_data; if (fasync_helper(fd, file, on, &channel->async_queue) < 0) return -EIO; return 0; }
static int gamepad_fasync(int fd, struct file *filp, int mode) { int fasync_result = fasync_helper(fd, filp, mode, &gamepad_queue); // Register signal listener if(fasync_result < 0) { printk(KERN_ERR "Failed to add/remove fasync entry\n"); } return fasync_result; }
static int ps2ev_fasync(int fd, struct file *file, int on) { int retval; struct ps2ev_data *data = file->private_data; retval = fasync_helper(fd, file, on, &data->fa); if (retval < 0) return retval; return 0; }
static int bma250_fasync(int fd, struct file *file, int mode) { struct bma250_data* data; #ifdef BMA250_DEBUG printk(KERN_INFO "%s\n",__FUNCTION__); #endif data=i2c_get_clientdata(bma250_client); return fasync_helper(fd,file,mode,&data->async_queue); return 0; }
/** * mei_fasync - asynchronous io support * * @fd: file descriptor * @file: pointer to file structure * @band: band bitmap * * Return: negative on error, * 0 if it did no changes, * and positive a process was added or deleted */ static int mei_fasync(int fd, struct file *file, int band) { struct mei_cl *cl = file->private_data; if (!mei_cl_is_connected(cl)) return -ENODEV; return fasync_helper(fd, file, band, &cl->ev_async); }
static int shmiq_qcntl_fasync (int fd, struct file *file, int on) { int retval; int minor = MINOR (file->f_dentry->d_inode->i_rdev); retval = fasync_helper (fd, file, on, &shmiqs [minor].fasync); if (retval < 0) return retval; return 0; }
static int ipmi_fasync(int fd, struct file *file, int on) { struct ipmi_file_private *priv = file->private_data; int result; mutex_lock(&ipmi_mutex); /* could race against open() otherwise */ result = fasync_helper(fd, file, on, &priv->fasync_queue); mutex_unlock(&ipmi_mutex); return (result); }
int andor_fasync(int fd, struct file *filp, int mode) { int iCardNo; #if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) iCardNo = MINOR(filp->f_dentry->d_inode->i_rdev); #else iCardNo = MINOR(file_inode(filp)->i_rdev); #endif return fasync_helper(fd, filp, mode, &(gpAndorDev[iCardNo].async_queue)); }
static int pipe_rdwr_fasync(int fd, struct file *filp, int on) { struct inode *inode = filp->f_dentry->d_inode; int retval; down(PIPE_SEM(*inode)); retval = fasync_helper(fd, filp, on, PIPE_FASYNC_READERS(*inode)); if (retval >= 0) retval = fasync_helper(fd, filp, on, PIPE_FASYNC_WRITERS(*inode)); up(PIPE_SEM(*inode)); if (retval < 0) return retval; return 0; }