mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
drivers: remove unimplemented open/close/ioctl interfaces
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
Xiang Xiao
parent
6041a2f0db
commit
09b3fb25ab
@@ -85,15 +85,15 @@ static void ads7843e_lock(FAR struct spi_dev_s *spi);
|
||||
static void ads7843e_unlock(FAR struct spi_dev_s *spi);
|
||||
|
||||
static uint16_t ads7843e_sendcmd(FAR struct ads7843e_dev_s *priv,
|
||||
uint8_t cmd);
|
||||
uint8_t cmd);
|
||||
|
||||
/* Interrupts and data sampling */
|
||||
|
||||
static void ads7843e_notify(FAR struct ads7843e_dev_s *priv);
|
||||
static int ads7843e_sample(FAR struct ads7843e_dev_s *priv,
|
||||
FAR struct ads7843e_sample_s *sample);
|
||||
FAR struct ads7843e_sample_s *sample);
|
||||
static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv,
|
||||
FAR struct ads7843e_sample_s *sample);
|
||||
FAR struct ads7843e_sample_s *sample);
|
||||
static void ads7843e_worker(FAR void *arg);
|
||||
static int ads7843e_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
|
||||
@@ -102,11 +102,11 @@ static int ads7843e_interrupt(int irq, FAR void *context, FAR void *arg);
|
||||
static int ads7843e_open(FAR struct file *filep);
|
||||
static int ads7843e_close(FAR struct file *filep);
|
||||
static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer,
|
||||
size_t len);
|
||||
size_t len);
|
||||
static int ads7843e_ioctl(FAR struct file *filep, int cmd,
|
||||
unsigned long arg);
|
||||
unsigned long arg);
|
||||
static int ads7843e_poll(FAR struct file *filep, struct pollfd *fds,
|
||||
bool setup);
|
||||
bool setup);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@@ -317,7 +317,7 @@ static void ads7843e_notify(FAR struct ads7843e_dev_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
static int ads7843e_sample(FAR struct ads7843e_dev_s *priv,
|
||||
FAR struct ads7843e_sample_s *sample)
|
||||
FAR struct ads7843e_sample_s *sample)
|
||||
{
|
||||
irqstate_t flags;
|
||||
int ret = -EAGAIN;
|
||||
@@ -1018,7 +1018,7 @@ static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
****************************************************************************/
|
||||
|
||||
static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
bool setup)
|
||||
bool setup)
|
||||
{
|
||||
FAR struct inode *inode;
|
||||
FAR struct ads7843e_dev_s *priv;
|
||||
@@ -1203,7 +1203,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi,
|
||||
|
||||
/* Register the device as an input device */
|
||||
|
||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &ads7843e_fops, 0666, priv);
|
||||
|
||||
@@ -1175,7 +1175,7 @@ int ft5x06_register(FAR struct i2c_master_s *i2c,
|
||||
|
||||
/* Register the device as an input device */
|
||||
|
||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &ft5x06_fops, 0666, priv);
|
||||
|
||||
@@ -1236,7 +1236,7 @@ int max11802_register(FAR struct spi_dev_s *spi,
|
||||
|
||||
/* Register the device as an input device */
|
||||
|
||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &max11802_fops, 0666, priv);
|
||||
|
||||
+1
-1
@@ -1915,7 +1915,7 @@ int mxt_register(FAR struct i2c_master_s *i2c,
|
||||
|
||||
/* Register the device as an input device */
|
||||
|
||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &mxt_fops, 0666, priv);
|
||||
|
||||
@@ -97,16 +97,16 @@ static inline int nunchuck_takesem(sem_t *sem);
|
||||
static int nunchuck_open(FAR struct file *filep);
|
||||
static int nunchuck_close(FAR struct file *filep);
|
||||
static ssize_t nunchuck_read(FAR struct file *filep, FAR char *buffer,
|
||||
size_t buflen);
|
||||
size_t buflen);
|
||||
static int nunchuck_ioctl(FAR struct file *filep, int cmd,
|
||||
unsigned long arg);
|
||||
unsigned long arg);
|
||||
|
||||
/* I2C Helpers */
|
||||
|
||||
static int nunchuck_i2c_read(FAR struct nunchuck_dev_s *priv,
|
||||
FAR uint8_t *regval, int len);
|
||||
FAR uint8_t *regval, int len);
|
||||
static int nunchuck_i2c_write(FAR struct nunchuck_dev_s *priv,
|
||||
uint8_t const *data, int len);
|
||||
uint8_t const *data, int len);
|
||||
static int nunchuck_sample(FAR struct nunchuck_dev_s *priv,
|
||||
FAR struct nunchuck_sample_s *buffer);
|
||||
|
||||
|
||||
@@ -1060,7 +1060,7 @@ int spq10kbd_register(FAR struct i2c_master_s *i2c,
|
||||
|
||||
priv->config->enable(priv->config, true);
|
||||
|
||||
snprintf(kbddevname, DEV_NAMELEN, DEV_FORMAT, kbdminor);
|
||||
snprintf(kbddevname, sizeof(kbddevname), DEV_FORMAT, kbdminor);
|
||||
iinfo("Registering %s\n", kbddevname);
|
||||
ret = register_driver(kbddevname, &g_hidkbd_fops, 0666, priv);
|
||||
|
||||
|
||||
@@ -91,20 +91,20 @@
|
||||
|
||||
static void stmpe811_notify(FAR struct stmpe811_dev_s *priv);
|
||||
static int stmpe811_sample(FAR struct stmpe811_dev_s *priv,
|
||||
FAR struct stmpe811_sample_s *sample);
|
||||
FAR struct stmpe811_sample_s *sample);
|
||||
static inline int stmpe811_waitsample(FAR struct stmpe811_dev_s *priv,
|
||||
FAR struct stmpe811_sample_s *sample);
|
||||
FAR struct stmpe811_sample_s *sample);
|
||||
|
||||
/* Character driver methods */
|
||||
|
||||
static int stmpe811_open(FAR struct file *filep);
|
||||
static int stmpe811_close(FAR struct file *filep);
|
||||
static ssize_t stmpe811_read(FAR struct file *filep, FAR char *buffer,
|
||||
size_t len);
|
||||
size_t len);
|
||||
static int stmpe811_ioctl(FAR struct file *filep, int cmd,
|
||||
unsigned long arg);
|
||||
unsigned long arg);
|
||||
static int stmpe811_poll(FAR struct file *filep, struct pollfd *fds,
|
||||
bool setup);
|
||||
bool setup);
|
||||
|
||||
/* Initialization logic */
|
||||
|
||||
@@ -886,7 +886,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor)
|
||||
|
||||
/* Register the character driver */
|
||||
|
||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||
ret = register_driver(devname, &g_stmpe811fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
|
||||
@@ -204,7 +204,7 @@ static int touch_close(FAR struct file *filep)
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t touch_write(FAR struct file *filep, FAR const char *buffer,
|
||||
size_t buflen)
|
||||
size_t buflen)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct touch_upperhalf_s *upper = inode->i_private;
|
||||
@@ -222,8 +222,8 @@ static ssize_t touch_write(FAR struct file *filep, FAR const char *buffer,
|
||||
* Name: touch_read
|
||||
****************************************************************************/
|
||||
|
||||
static ssize_t
|
||||
touch_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
static ssize_t touch_read(FAR struct file *filep, FAR char *buffer,
|
||||
size_t len)
|
||||
{
|
||||
FAR struct touch_openpriv_s *openpriv = filep->f_priv;
|
||||
int ret;
|
||||
|
||||
@@ -1267,7 +1267,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
|
||||
/* Register the device as an input device */
|
||||
|
||||
snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
snprintf(devname, sizeof(devname), DEV_FORMAT, minor);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &tsc2007_fops, 0666, priv);
|
||||
|
||||
Reference in New Issue
Block a user