inode/i_private: remove all unnecessary cast for i_private
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
f556cb106a
commit
b60f01a55b
@ -824,7 +824,7 @@ static int cxd56_emmc_open(struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct cxd56_emmc_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Just increment the reference count on the driver */
|
||||
|
||||
@ -845,7 +845,7 @@ static int cxd56_emmc_close(struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct cxd56_emmc_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Decrement the reference count on the block driver */
|
||||
|
||||
@ -869,7 +869,7 @@ static ssize_t cxd56_emmc_read(struct inode *inode,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct cxd56_emmc_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
finfo("Read sector %" PRIuOFF " (%u sectors) to %p\n",
|
||||
start_sector, nsectors, buffer);
|
||||
@ -894,7 +894,7 @@ static ssize_t cxd56_emmc_write(struct inode *inode,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct cxd56_emmc_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
finfo("Write %p to sector %" PRIu32 " (%u sectors)\n", buffer,
|
||||
start_sector, nsectors);
|
||||
@ -916,7 +916,7 @@ static int cxd56_emmc_geometry(struct inode *inode,
|
||||
struct cxd56_emmc_state_s *priv;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct cxd56_emmc_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
memset(geometry, 0, sizeof(*geometry));
|
||||
|
||||
|
@ -555,7 +555,7 @@ static int cxd56_geofence_poll(struct file *filep,
|
||||
int i;
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (struct cxd56_geofence_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -1031,7 +1031,7 @@ static int cxd56_gnss_check_cep_data(struct file *filep, unsigned long arg)
|
||||
struct cxd56_gnss_dev_s *priv;
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (struct cxd56_gnss_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Set a flag for checking CEP data */
|
||||
|
||||
@ -1569,7 +1569,7 @@ static int cxd56_gnss_set_signal(struct file *filep, unsigned long arg)
|
||||
}
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (struct cxd56_gnss_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
@ -2570,7 +2570,7 @@ static int cxd56_gnss_cpufifo_api(struct file *filep, unsigned int api,
|
||||
int ret = OK;
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (struct cxd56_gnss_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
type = CXD56_GNSS_CPUFIFOAPI_SET_DATA(api, data);
|
||||
cxd56_cpu1sigsend(CXD56_CPU1_DATA_TYPE_CPUFIFOAPI, type);
|
||||
@ -2711,7 +2711,7 @@ static int cxd56_gnss_open(struct file *filep)
|
||||
int retry = 50;
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (struct cxd56_gnss_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
while (!g_rtc_enabled && 0 < retry--)
|
||||
{
|
||||
@ -2812,7 +2812,7 @@ static int cxd56_gnss_close(struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (struct cxd56_gnss_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
@ -2954,7 +2954,7 @@ static int cxd56_gnss_ioctl(struct file *filep, int cmd,
|
||||
int ret;
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (struct cxd56_gnss_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
if (cmd <= CXD56_GNSS_IOCTL_INVAL || cmd >= CXD56_GNSS_IOCTL_MAX)
|
||||
{
|
||||
@ -2998,7 +2998,7 @@ static int cxd56_gnss_poll(struct file *filep, struct pollfd *fds,
|
||||
int i;
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (struct cxd56_gnss_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -200,7 +200,7 @@ static int hif_open(struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (struct cxd56_hifdev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Check parameters */
|
||||
@ -254,7 +254,7 @@ static int hif_close(struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (struct cxd56_hifdev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Decrement reference counter */
|
||||
@ -281,7 +281,7 @@ static ssize_t hif_read(struct file *filep, char *buffer, size_t len)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (struct cxd56_hifdev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Check parameters */
|
||||
@ -312,7 +312,7 @@ static ssize_t hif_write(struct file *filep,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (struct cxd56_hifdev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Check parameters */
|
||||
|
@ -115,7 +115,7 @@ static int sph_open(struct file *filep)
|
||||
static int sph_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
struct sph_dev_s *priv =
|
||||
(struct sph_dev_s *)filep->f_inode->i_private;
|
||||
filep->f_inode->i_private;
|
||||
int ret = -ENOTTY;
|
||||
|
||||
hsinfo("cmd = %x\n", cmd);
|
||||
|
@ -132,7 +132,7 @@ static ssize_t mmcl_read(struct inode *inode, unsigned char *buffer,
|
||||
finfo("sector: %" PRIuOFF " nsectors: %u\n", start_sector, nsectors);
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct mmcl_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
nread = MTD_BREAD(dev->mtd, start_sector, nsectors, buffer);
|
||||
if (nread != nsectors)
|
||||
@ -162,7 +162,7 @@ static ssize_t mmcl_write(struct inode *inode,
|
||||
finfo("sector: %" PRIuOFF " nsectors: %u\n", start_sector, nsectors);
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct mmcl_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
nwrite = MTD_BWRITE(dev->mtd, start_sector, nsectors, buffer);
|
||||
if (nwrite != nsectors)
|
||||
@ -190,7 +190,7 @@ static int mmcl_geometry(struct inode *inode, struct geometry *geometry)
|
||||
|
||||
if (geometry)
|
||||
{
|
||||
dev = (struct mmcl_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
memset(geometry, 0, sizeof(*geometry));
|
||||
|
||||
@ -226,7 +226,7 @@ static int mmcl_ioctl(struct inode *inode, int cmd, unsigned long arg)
|
||||
finfo("Entry\n");
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct mmcl_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
ret = MTD_IOCTL(dev->mtd, cmd, arg);
|
||||
if (ret < 0)
|
||||
|
@ -157,7 +157,7 @@ static int eeed_open(struct inode *inode)
|
||||
struct eeed_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct eeed_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Increment the open reference count */
|
||||
|
||||
@ -182,7 +182,7 @@ static int eeed_close(struct inode *inode)
|
||||
struct eeed_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct eeed_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Increment the open reference count */
|
||||
|
||||
@ -207,7 +207,7 @@ static ssize_t eeed_read(struct inode *inode, unsigned char *buffer,
|
||||
struct eeed_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct eeed_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
finfo("sector: %" PRIu64 " nsectors: %u sectorsize: %d\n",
|
||||
start_sector, nsectors, dev->eeed_sectsize);
|
||||
@ -244,7 +244,7 @@ static ssize_t eeed_write(struct inode *inode,
|
||||
struct eeed_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct eeed_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
finfo("sector: %" PRIu64 " nsectors: %u sectorsize: %d\n",
|
||||
start_sector, nsectors, dev->eeed_sectsize);
|
||||
@ -290,7 +290,7 @@ static int eeed_geometry(struct inode *inode, struct geometry *geometry)
|
||||
|
||||
if (geometry)
|
||||
{
|
||||
dev = (struct eeed_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
memset(geometry, 0, sizeof(*geometry));
|
||||
|
||||
@ -331,7 +331,7 @@ static int eeed_ioctl(struct inode *inode, int cmd, unsigned long arg)
|
||||
DEBUGASSERT(inode->i_private);
|
||||
if (cmd == BIOC_XIPBASE && ppv)
|
||||
{
|
||||
dev = (struct eeed_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
*ppv = (void *)dev->eeed_buffer;
|
||||
|
||||
finfo("ppv: %p\n", *ppv);
|
||||
@ -355,7 +355,7 @@ static int eeed_unlink(struct inode *inode)
|
||||
struct eeed_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct eeed_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* And free the block driver itself */
|
||||
|
||||
|
@ -973,7 +973,7 @@ static ssize_t sam_tsd_read(struct file *filep, char *buffer, size_t len)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct sam_tsd_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -1107,7 +1107,7 @@ static int sam_tsd_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct sam_tsd_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1166,7 +1166,7 @@ static int sam_tsd_poll(struct file *filep, struct pollfd *fds, bool setup)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct sam_tsd_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the ADC hardware */
|
||||
|
||||
|
@ -255,7 +255,7 @@ static int stm32_bbsram_open(struct file *filep)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
/* Increment the reference count */
|
||||
|
||||
@ -310,7 +310,7 @@ static int stm32_bbsram_close(struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -358,7 +358,7 @@ static off_t stm32_bbsram_seek(struct file *filep, off_t offset,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -428,7 +428,7 @@ static ssize_t stm32_bbsram_read(struct file *filep, char *buffer,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -474,7 +474,7 @@ static ssize_t stm32_bbsram_write(struct file *filep,
|
||||
int ret = -EFBIG;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
/* Forbid writes past the end of the device */
|
||||
|
||||
@ -538,7 +538,7 @@ static int stm32_bbsram_ioctl(struct file *filep, int cmd,
|
||||
int ret = -ENOTTY;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
if (cmd == STM32_BBSRAM_GETDESC_IOCTL)
|
||||
{
|
||||
@ -591,7 +591,7 @@ static int stm32_bbsram_unlink(struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
|
@ -255,7 +255,7 @@ static int stm32_bbsram_open(struct file *filep)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
/* Increment the reference count */
|
||||
|
||||
@ -310,7 +310,7 @@ static int stm32_bbsram_close(struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -358,7 +358,7 @@ static off_t stm32_bbsram_seek(struct file *filep, off_t offset,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -428,7 +428,7 @@ static ssize_t stm32_bbsram_read(struct file *filep, char *buffer,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -474,7 +474,7 @@ static ssize_t stm32_bbsram_write(struct file *filep,
|
||||
int ret = -EFBIG;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
/* Forbid writes past the end of the device */
|
||||
|
||||
@ -538,7 +538,7 @@ static int stm32_bbsram_ioctl(struct file *filep, int cmd,
|
||||
int ret = -ENOTTY;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
if (cmd == STM32F7_BBSRAM_GETDESC_IOCTL)
|
||||
{
|
||||
@ -591,7 +591,7 @@ static int stm32_bbsram_unlink(struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
|
@ -301,7 +301,7 @@ static int stm32_bbsram_open(struct file *filep)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
/* Increment the reference count */
|
||||
|
||||
@ -356,7 +356,7 @@ static int stm32_bbsram_close(struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -404,7 +404,7 @@ static off_t stm32_bbsram_seek(struct file *filep, off_t offset,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -474,7 +474,7 @@ static ssize_t stm32_bbsram_read(struct file *filep, char *buffer,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
@ -521,7 +521,7 @@ static ssize_t stm32_bbsram_write(struct file *filep,
|
||||
int ret = -EFBIG;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
/* Forbid writes past the end of the device */
|
||||
|
||||
@ -585,7 +585,7 @@ static int stm32_bbsram_ioctl(struct file *filep, int cmd,
|
||||
int ret = -ENOTTY;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
if (cmd == STM32H7_BBSRAM_GETDESC_IOCTL)
|
||||
{
|
||||
@ -638,7 +638,7 @@ static int stm32_bbsram_unlink(struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct stm32_bbsram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bbr->lock);
|
||||
if (ret < 0)
|
||||
|
@ -207,7 +207,7 @@ static int rx65n_sbram_open(struct file *filep)
|
||||
struct rx65n_sbram_s *bbr;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct rx65n_sbram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
/* Increment the reference count */
|
||||
|
||||
@ -258,7 +258,7 @@ static int rx65n_sbram_close(struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct rx65n_sbram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
nxmutex_lock(&bbr->lock);
|
||||
|
||||
@ -300,7 +300,7 @@ static off_t rx65n_sbram_seek(struct file *filep, off_t offset,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct rx65n_sbram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
nxmutex_lock(&bbr->lock);
|
||||
|
||||
@ -369,7 +369,7 @@ static ssize_t rx65n_sbram_read(struct file *filep, char *buffer,
|
||||
struct rx65n_sbram_s *bbr;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct rx65n_sbram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
nxmutex_lock(&bbr->lock);
|
||||
|
||||
@ -411,7 +411,7 @@ static ssize_t rx65n_sbram_write(struct file *filep, const char *buffer,
|
||||
int ret = -EFBIG;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct rx65n_sbram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
/* Forbid writes past the end of the device */
|
||||
|
||||
@ -467,7 +467,7 @@ static int rx65n_sbram_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
int ret = -ENOTTY;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct rx65n_sbram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
if (cmd == RX65N_SBRAM_GETDESC_IOCTL)
|
||||
{
|
||||
@ -514,7 +514,7 @@ static int rx65n_sbram_unlink(struct inode *inode)
|
||||
struct rx65n_sbram_s *bbr;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bbr = (struct rx65n_sbram_s *)inode->i_private;
|
||||
bbr = inode->i_private;
|
||||
|
||||
nxmutex_lock(&bbr->lock);
|
||||
memset(bbr->bbf->data, 0, bbr->bbf->len);
|
||||
|
@ -127,7 +127,7 @@ static int smbus_sbd_open(struct file *filep)
|
||||
/* Retrieve the smbus_sbd_dev_s struct */
|
||||
|
||||
DEBUGASSERT(filep->f_inode->i_private);
|
||||
dev = (struct smbus_sbd_dev_s *)filep->f_inode->i_private;
|
||||
dev = filep->f_inode->i_private;
|
||||
|
||||
/* Increase the open reference count */
|
||||
|
||||
@ -159,7 +159,7 @@ static int smbus_sbd_close(struct file *filep)
|
||||
/* Retrieve the smbus_sbd_dev_s struct */
|
||||
|
||||
DEBUGASSERT(filep->f_inode->i_private);
|
||||
dev = (struct smbus_sbd_dev_s *)filep->f_inode->i_private;
|
||||
dev = filep->f_inode->i_private;
|
||||
|
||||
/* Decrease the open reference count */
|
||||
|
||||
@ -223,7 +223,7 @@ static ssize_t smbus_sbd_read(struct file *filep, char *buffer,
|
||||
*/
|
||||
|
||||
DEBUGASSERT(filep->f_inode->i_private);
|
||||
dev = (struct smbus_sbd_dev_s *)filep->f_inode->i_private;
|
||||
dev = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(buffer);
|
||||
read_data = (struct smbus_sbd_data_s *)buffer;
|
||||
@ -321,7 +321,7 @@ static ssize_t smbus_sbd_write(struct file *filep, const char *buffer,
|
||||
*/
|
||||
|
||||
DEBUGASSERT(filep->f_inode->i_private);
|
||||
dev = (struct smbus_sbd_dev_s *)filep->f_inode->i_private;
|
||||
dev = filep->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(buffer);
|
||||
new_data = (struct smbus_sbd_data_s *)buffer;
|
||||
|
@ -1098,7 +1098,7 @@ static int tc_open(struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1149,7 +1149,7 @@ static int tc_close(struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1189,7 +1189,7 @@ static ssize_t tc_read(struct file *filep, char *buffer, size_t len)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -1312,7 +1312,7 @@ static int tc_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1354,7 +1354,7 @@ static int tc_poll(struct file *filep, struct pollfd *fds, bool setup)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
||||
|
@ -975,7 +975,7 @@ static int tc_open(struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1026,7 +1026,7 @@ static int tc_close(struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1066,7 +1066,7 @@ static ssize_t tc_read(struct file *filep, char *buffer, size_t len)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -1189,7 +1189,7 @@ static int tc_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1231,7 +1231,7 @@ static int tc_poll(struct file *filep, struct pollfd *fds, bool setup)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (struct tc_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
||||
|
@ -119,7 +119,7 @@ static int bch_open(FAR struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bch = (FAR struct bchlib_s *)inode->i_private;
|
||||
bch = inode->i_private;
|
||||
|
||||
/* Increment the reference count */
|
||||
|
||||
@ -156,7 +156,7 @@ static int bch_close(FAR struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bch = (FAR struct bchlib_s *)inode->i_private;
|
||||
bch = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
@ -225,7 +225,7 @@ static off_t bch_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
|
||||
bch = (FAR struct bchlib_s *)inode->i_private;
|
||||
bch = inode->i_private;
|
||||
ret = nxmutex_lock(&bch->lock);
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -295,7 +295,7 @@ static ssize_t bch_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
ssize_t ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bch = (FAR struct bchlib_s *)inode->i_private;
|
||||
bch = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&bch->lock);
|
||||
if (ret < 0)
|
||||
@ -325,7 +325,7 @@ static ssize_t bch_write(FAR struct file *filep, FAR const char *buffer,
|
||||
ssize_t ret = -EACCES;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bch = (FAR struct bchlib_s *)inode->i_private;
|
||||
bch = inode->i_private;
|
||||
|
||||
if (!bch->readonly)
|
||||
{
|
||||
@ -362,7 +362,7 @@ static int bch_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
int ret = -ENOTTY;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bch = (FAR struct bchlib_s *)inode->i_private;
|
||||
bch = inode->i_private;
|
||||
|
||||
/* Process the call according to the command */
|
||||
|
||||
@ -474,7 +474,7 @@ static int bch_unlink(FAR struct inode *inode)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
bch = (FAR struct bchlib_s *)inode->i_private;
|
||||
bch = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the BCH device */
|
||||
|
||||
|
@ -1009,7 +1009,7 @@ static int can_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
bool setup)
|
||||
{
|
||||
FAR struct inode *inode = (FAR struct inode *)filep->f_inode;
|
||||
FAR struct can_dev_s *dev = (FAR struct can_dev_s *)inode->i_private;
|
||||
FAR struct can_dev_s *dev = inode->i_private;
|
||||
FAR struct can_reader_s *reader = NULL;
|
||||
pollevent_t eventset;
|
||||
int ndx;
|
||||
|
@ -346,7 +346,7 @@ static int ee24xx_open(FAR struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee24xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -383,7 +383,7 @@ static int ee24xx_close(FAR struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee24xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -423,7 +423,7 @@ static off_t ee24xx_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee24xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -499,7 +499,7 @@ static ssize_t ee24xx_read(FAR struct file *filep, FAR char *buffer,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee24xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -578,7 +578,7 @@ static ssize_t at24cs_read_uuid(FAR struct file *filep, FAR char *buffer,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee24xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -654,7 +654,7 @@ static ssize_t ee24xx_write(FAR struct file *filep, FAR const char *buffer,
|
||||
int savelen;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee24xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
if (eedev->readonly)
|
||||
{
|
||||
@ -780,7 +780,7 @@ static int ee24xx_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
int ret = 0;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee24xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
UNUSED(eedev);
|
||||
|
||||
switch (cmd)
|
||||
|
@ -468,7 +468,7 @@ static int ee25xx_open(FAR struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee25xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -505,7 +505,7 @@ static int ee25xx_close(FAR struct file *filep)
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee25xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -545,7 +545,7 @@ static off_t ee25xx_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee25xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -617,7 +617,7 @@ static ssize_t ee25xx_read(FAR struct file *filep, FAR char *buffer,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee25xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&eedev->lock);
|
||||
if (ret < 0)
|
||||
@ -669,7 +669,7 @@ static ssize_t ee25xx_write(FAR struct file *filep, FAR const char *buffer,
|
||||
int ret = -EACCES;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee25xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
|
||||
if (eedev->readonly)
|
||||
{
|
||||
@ -766,7 +766,7 @@ static int ee25xx_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
int ret = 0;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
eedev = (FAR struct ee25xx_dev_s *)inode->i_private;
|
||||
eedev = inode->i_private;
|
||||
UNUSED(eedev);
|
||||
|
||||
switch (cmd)
|
||||
|
@ -126,7 +126,7 @@ static int i2cdrvr_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct i2c_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the I2C driver state structure */
|
||||
@ -162,7 +162,7 @@ static int i2cdrvr_close(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct i2c_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the I2C driver state structure */
|
||||
@ -231,7 +231,7 @@ static int i2cdrvr_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct i2c_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||
@ -306,7 +306,7 @@ static int i2cdrvr_unlink(FAR struct inode *inode)
|
||||
/* Get our private data structure */
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct i2c_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the I2C driver state structure */
|
||||
|
||||
|
@ -221,7 +221,7 @@ static ssize_t i2schar_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct i2schar_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Verify that the buffer refers to one, correctly sized audio buffer */
|
||||
@ -293,7 +293,7 @@ static ssize_t i2schar_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct i2schar_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Verify that the buffer refers to one, correctly sized audio buffer */
|
||||
@ -358,7 +358,7 @@ static int i2schar_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct i2schar_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL && priv->i2s && priv->i2s->ops);
|
||||
|
||||
if (priv->i2s->ops->i2s_ioctl)
|
||||
|
@ -716,7 +716,7 @@ static int ads7843e_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ads7843e_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -769,7 +769,7 @@ static int ads7843e_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ads7843e_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -812,7 +812,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ads7843e_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -938,7 +938,7 @@ static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ads7843e_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -994,7 +994,7 @@ static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ads7843e_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
||||
|
@ -299,7 +299,7 @@ static int ajoy_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ajoy_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Allocate a new open structure */
|
||||
|
||||
@ -355,7 +355,7 @@ static int ajoy_close(FAR struct file *filep)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ajoy_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
@ -417,7 +417,7 @@ static ssize_t ajoy_read(FAR struct file *filep, FAR char *buffer,
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ajoy_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that the buffer is sufficiently large to hold at least one
|
||||
* complete sample.
|
||||
@ -467,7 +467,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ajoy_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
|
@ -311,7 +311,7 @@ static int btn_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Allocate a new open structure */
|
||||
|
||||
@ -367,7 +367,7 @@ static int btn_close(FAR struct file *filep)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
@ -434,7 +434,7 @@ static ssize_t btn_read(FAR struct file *filep, FAR char *buffer,
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that the buffer is sufficiently large to hold at least one
|
||||
* complete sample.
|
||||
@ -478,7 +478,7 @@ static ssize_t btn_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that the buffer is sufficiently large to hold at least one
|
||||
* complete sample.
|
||||
@ -530,7 +530,7 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
@ -657,7 +657,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct btn_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
|
@ -988,7 +988,7 @@ static int mbr3108_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mbr3108_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -299,7 +299,7 @@ static int djoy_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct djoy_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Allocate a new open structure */
|
||||
|
||||
@ -355,7 +355,7 @@ static int djoy_close(FAR struct file *filep)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct djoy_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
@ -417,7 +417,7 @@ static ssize_t djoy_read(FAR struct file *filep, FAR char *buffer,
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct djoy_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that the buffer is sufficiently large to hold at least one
|
||||
* complete sample.
|
||||
@ -463,7 +463,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct djoy_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
|
@ -735,7 +735,7 @@ static int ft5x06_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ft5x06_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -793,7 +793,7 @@ static int ft5x06_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ft5x06_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -840,7 +840,7 @@ static ssize_t ft5x06_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ft5x06_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -912,7 +912,7 @@ static int ft5x06_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ft5x06_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -969,7 +969,7 @@ static int ft5x06_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ft5x06_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
||||
|
@ -762,7 +762,7 @@ static int gt9xx_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
DEBUGASSERT(fds);
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct gt9xx_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Begin Mutex: Lock to prevent concurrent update to Poll Waiters */
|
||||
|
||||
|
@ -709,7 +709,7 @@ static int max11802_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max11802_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -762,7 +762,7 @@ static int max11802_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max11802_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -805,7 +805,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max11802_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -931,7 +931,7 @@ static int max11802_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max11802_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -987,7 +987,7 @@ static int max11802_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max11802_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
||||
|
@ -1107,7 +1107,7 @@ static int mxt_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mxt_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1184,7 +1184,7 @@ static int mxt_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mxt_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1238,7 +1238,7 @@ static ssize_t mxt_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mxt_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -1464,7 +1464,7 @@ static int mxt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mxt_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1521,7 +1521,7 @@ static int mxt_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mxt_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
||||
|
@ -277,7 +277,7 @@ static int nunchuck_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct nunchuck_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
@ -333,7 +333,7 @@ static int nunchuck_close(FAR struct file *filep)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct nunchuck_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Handle an improbable race conditions with the following atomic test
|
||||
* and set.
|
||||
@ -415,7 +415,7 @@ static ssize_t nunchuck_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct nunchuck_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that the buffer is sufficiently large to hold at least one
|
||||
* complete sample.
|
||||
@ -463,7 +463,7 @@ static int nunchuck_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
DEBUGASSERT(filep->f_priv);
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct nunchuck_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
|
@ -311,7 +311,7 @@ static int stmpe811_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct stmpe811_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -367,7 +367,7 @@ static int stmpe811_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct stmpe811_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -414,7 +414,7 @@ static ssize_t stmpe811_read(FAR struct file *filep,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct stmpe811_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -538,7 +538,7 @@ static int stmpe811_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct stmpe811_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -631,7 +631,7 @@ static int stmpe811_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct stmpe811_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
||||
|
@ -779,7 +779,7 @@ static int tsc2007_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct tsc2007_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -831,7 +831,7 @@ static int tsc2007_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct tsc2007_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -873,7 +873,7 @@ static ssize_t tsc2007_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct tsc2007_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the touch data.
|
||||
@ -1003,7 +1003,7 @@ static int tsc2007_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct tsc2007_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1076,7 +1076,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct tsc2007_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
||||
|
@ -892,7 +892,7 @@ static off_t ht16k33_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ht16k33_dev_s *priv =
|
||||
(FAR struct ht16k33_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
off_t maxpos;
|
||||
off_t pos;
|
||||
|
||||
@ -994,7 +994,7 @@ static int ht16k33_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ht16k33_dev_s *priv =
|
||||
(FAR struct ht16k33_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
FAR struct slcd_curpos_s *attr =
|
||||
(FAR struct slcd_curpos_s *)((uintptr_t)arg);
|
||||
|
||||
@ -1007,7 +1007,7 @@ static int ht16k33_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ht16k33_dev_s *priv =
|
||||
(FAR struct ht16k33_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
|
||||
nxmutex_lock(&priv->lock);
|
||||
*(FAR int *)((uintptr_t)arg) = 1; /* Hardcoded */
|
||||
@ -1019,7 +1019,7 @@ static int ht16k33_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ht16k33_dev_s *priv =
|
||||
(FAR struct ht16k33_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
|
||||
nxmutex_lock(&priv->lock);
|
||||
ht16k33_setcontrast(priv, 0, (uint8_t)arg);
|
||||
|
@ -89,7 +89,7 @@ static int lcddev_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct lcddev_dev_s *priv;
|
||||
int ret = OK;
|
||||
|
||||
priv = (FAR struct lcddev_dev_s *)filep->f_inode->i_private;
|
||||
priv = filep->f_inode->i_private;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
|
@ -1026,7 +1026,7 @@ static int pcf8574_lcd_open(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
|
||||
/* Increment the reference count */
|
||||
|
||||
@ -1057,7 +1057,7 @@ static int pcf8574_lcd_close(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
int ret;
|
||||
|
||||
/* Decrement the reference count */
|
||||
@ -1103,7 +1103,7 @@ static ssize_t pcf8574_lcd_read(FAR struct file *filep, FAR char *buffer,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
int nidx;
|
||||
uint8_t addr;
|
||||
uint8_t row;
|
||||
@ -1185,7 +1185,7 @@ static ssize_t pcf8574_lcd_write(FAR struct file *filep,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
struct lib_meminstream_s instream;
|
||||
uint8_t row;
|
||||
uint8_t col;
|
||||
@ -1342,7 +1342,7 @@ static off_t pcf8574_lcd_seek(FAR struct file *filep, off_t offset,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
off_t pos;
|
||||
int maxpos;
|
||||
|
||||
@ -1425,7 +1425,7 @@ static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
FAR struct slcd_attributes_s *attr =
|
||||
(FAR struct slcd_attributes_s *)((uintptr_t) arg);
|
||||
|
||||
@ -1448,7 +1448,7 @@ static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
FAR struct slcd_curpos_s *attr =
|
||||
(FAR struct slcd_curpos_s *)((uintptr_t) arg);
|
||||
uint8_t row;
|
||||
@ -1468,7 +1468,7 @@ static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
bool bon;
|
||||
|
||||
bon = (priv->bl_bit && priv->cfg.bl_active_high) ||
|
||||
@ -1481,7 +1481,7 @@ static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
|
||||
nxmutex_lock(&priv->lock);
|
||||
lcd_backlight(priv, arg ? true : false);
|
||||
@ -1493,7 +1493,7 @@ static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
FAR struct slcd_createchar_s *attr =
|
||||
(FAR struct slcd_createchar_s *)((uintptr_t) arg);
|
||||
|
||||
@ -1540,7 +1540,7 @@ static int pcf8574_lcd_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
static int pcf8574_lcd_unlink(FAR struct inode *inode)
|
||||
{
|
||||
FAR struct pcf8574_lcd_dev_s *priv =
|
||||
(FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
int ret = OK;
|
||||
|
||||
nxmutex_lock(&priv->lock);
|
||||
|
@ -821,7 +821,7 @@ static off_t st7032_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct st7032_dev_s *priv =
|
||||
(FAR struct st7032_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
off_t maxpos;
|
||||
off_t pos;
|
||||
|
||||
@ -924,7 +924,7 @@ static int st7032_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct st7032_dev_s *priv =
|
||||
(FAR struct st7032_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
FAR struct slcd_curpos_s *attr =
|
||||
(FAR struct slcd_curpos_s *)((uintptr_t)arg);
|
||||
|
||||
@ -937,7 +937,7 @@ static int st7032_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct st7032_dev_s *priv =
|
||||
(FAR struct st7032_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
|
||||
nxmutex_lock(&priv->lock);
|
||||
*(FAR int *)((uintptr_t)arg) = 1; /* Hardcoded */
|
||||
@ -949,7 +949,7 @@ static int st7032_ioctl(FAR struct file *filep, int cmd,
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct st7032_dev_s *priv =
|
||||
(FAR struct st7032_dev_s *)inode->i_private;
|
||||
inode->i_private;
|
||||
|
||||
nxmutex_lock(&priv->lock);
|
||||
|
||||
|
@ -825,7 +825,7 @@ static int tda19988_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct tda1988_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Get exclusive access to the driver instance */
|
||||
@ -867,7 +867,7 @@ static int tda19988_close(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct tda1988_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Get exclusive access to the driver */
|
||||
@ -923,7 +923,7 @@ static ssize_t tda19988_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct tda1988_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Get exclusive access to the driver */
|
||||
@ -992,7 +992,7 @@ static off_t tda19988_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct tda1988_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Get exclusive access to the driver */
|
||||
@ -1085,7 +1085,7 @@ static int tda19988_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct tda1988_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Get exclusive access to the driver */
|
||||
@ -1163,7 +1163,7 @@ static int tda19988_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct tda1988_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Get exclusive access to the driver */
|
||||
@ -1204,7 +1204,7 @@ static int tda19988_unlink(FAR struct inode *inode)
|
||||
/* Get the private driver state instance */
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct tda1988_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver */
|
||||
|
||||
|
@ -124,7 +124,7 @@ static int userled_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct userled_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
@ -180,7 +180,7 @@ static int userled_close(FAR struct file *filep)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct userled_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Handle an improbable race conditions with the following atomic test
|
||||
* and set.
|
||||
@ -263,7 +263,7 @@ static ssize_t userled_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct userled_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that the buffer is sufficiently large to hold at least one
|
||||
* complete sample.
|
||||
@ -319,7 +319,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
filep->f_inode != NULL);
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct userled_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
|
@ -111,7 +111,7 @@ static int loop_open(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct loop_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Make sure we have exclusive access to the state structure */
|
||||
|
||||
@ -148,7 +148,7 @@ static int loop_close(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct loop_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Make sure we have exclusive access to the state structure */
|
||||
|
||||
@ -188,7 +188,7 @@ static ssize_t loop_read(FAR struct inode *inode, FAR unsigned char *buffer,
|
||||
off_t ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct loop_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
if (start_sector + nsectors > dev->nsectors)
|
||||
{
|
||||
@ -242,7 +242,7 @@ static ssize_t loop_write(FAR struct inode *inode,
|
||||
off_t ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct loop_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Calculate the offset to write the sectors and seek to the position */
|
||||
|
||||
@ -286,7 +286,7 @@ static int loop_geometry(FAR struct inode *inode,
|
||||
|
||||
if (geometry)
|
||||
{
|
||||
dev = (FAR struct loop_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
memset(geometry, 0, sizeof(*geometry));
|
||||
|
||||
@ -447,7 +447,7 @@ int loteardown(FAR const char *devname)
|
||||
|
||||
/* Inode private data is a reference to the loop device structure */
|
||||
|
||||
dev = (FAR struct loop_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
close_blockdriver(inode);
|
||||
|
||||
DEBUGASSERT(dev != NULL);
|
||||
|
@ -168,7 +168,7 @@ static int rd_open(FAR struct inode *inode)
|
||||
FAR struct rd_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct rd_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Increment the open reference count */
|
||||
|
||||
@ -193,7 +193,7 @@ static int rd_close(FAR struct inode *inode)
|
||||
FAR struct rd_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct rd_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Increment the open reference count */
|
||||
|
||||
@ -234,7 +234,7 @@ static ssize_t rd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
FAR struct rd_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct rd_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
finfo("sector: %" PRIuOFF " nsectors: %u sectorsize: %d\n",
|
||||
start_sector, nsectors, dev->rd_sectsize);
|
||||
@ -268,7 +268,7 @@ static ssize_t rd_write(FAR struct inode *inode, const unsigned char *buffer,
|
||||
struct rd_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct rd_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
finfo("sector: %" PRIuOFF " nsectors: %u sectorsize: %d\n",
|
||||
start_sector, nsectors, dev->rd_sectsize);
|
||||
@ -308,7 +308,7 @@ static int rd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
|
||||
if (geometry)
|
||||
{
|
||||
dev = (struct rd_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
memset(geometry, 0, sizeof(*geometry));
|
||||
|
||||
@ -349,7 +349,7 @@ static int rd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
DEBUGASSERT(inode->i_private);
|
||||
if (cmd == BIOC_XIPBASE && ppv)
|
||||
{
|
||||
dev = (FAR struct rd_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
*ppv = (FAR void *)dev->rd_buffer;
|
||||
|
||||
finfo("ppv: %p\n", *ppv);
|
||||
@ -373,7 +373,7 @@ static int rd_unlink(FAR struct inode *inode)
|
||||
FAR struct rd_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct rd_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Mark the pipe unlinked */
|
||||
|
||||
|
@ -166,7 +166,7 @@ static const rpmsg_ept_cb g_rpmsgblk_handler[] =
|
||||
|
||||
static int rpmsgblk_open(FAR struct inode *inode)
|
||||
{
|
||||
FAR struct rpmsgblk_s *priv = (FAR struct rpmsgblk_s *)inode->i_private;
|
||||
FAR struct rpmsgblk_s *priv = inode->i_private;
|
||||
struct rpmsgblk_open_s msg;
|
||||
int ret;
|
||||
|
||||
@ -216,7 +216,7 @@ static int rpmsgblk_open(FAR struct inode *inode)
|
||||
|
||||
static int rpmsgblk_close(FAR struct inode *inode)
|
||||
{
|
||||
FAR struct rpmsgblk_s *priv = (FAR struct rpmsgblk_s *)inode->i_private;
|
||||
FAR struct rpmsgblk_s *priv = inode->i_private;
|
||||
struct rpmsgblk_close_s msg;
|
||||
int ret;
|
||||
|
||||
@ -266,7 +266,7 @@ static ssize_t rpmsgblk_read(FAR struct inode *inode,
|
||||
FAR unsigned char *buffer,
|
||||
blkcnt_t start_sector, unsigned int nsectors)
|
||||
{
|
||||
FAR struct rpmsgblk_s *priv = (FAR struct rpmsgblk_s *)inode->i_private;
|
||||
FAR struct rpmsgblk_s *priv = inode->i_private;
|
||||
struct rpmsgblk_read_s msg;
|
||||
struct iovec iov;
|
||||
int ret;
|
||||
@ -326,7 +326,7 @@ static ssize_t rpmsgblk_write(FAR struct inode *inode,
|
||||
FAR const unsigned char *buffer,
|
||||
blkcnt_t start_sector, unsigned int nsectors)
|
||||
{
|
||||
FAR struct rpmsgblk_s *priv = (FAR struct rpmsgblk_s *)inode->i_private;
|
||||
FAR struct rpmsgblk_s *priv = inode->i_private;
|
||||
FAR struct rpmsgblk_write_s *msg;
|
||||
struct rpmsgblk_cookie_s cookie;
|
||||
uint32_t sectorsize;
|
||||
@ -434,7 +434,7 @@ out:
|
||||
static int rpmsgblk_geometry(FAR struct inode *inode,
|
||||
FAR struct geometry *geometry)
|
||||
{
|
||||
FAR struct rpmsgblk_s *priv = (FAR struct rpmsgblk_s *)inode->i_private;
|
||||
FAR struct rpmsgblk_s *priv = inode->i_private;
|
||||
struct rpmsgblk_geometry_s *msg;
|
||||
uint32_t space;
|
||||
int msglen;
|
||||
@ -577,7 +577,7 @@ static ssize_t rpmsgblk_ioctl_arglen(int cmd, unsigned long arg)
|
||||
static int rpmsgblk_ioctl(FAR struct inode *inode, int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
FAR struct rpmsgblk_s *priv = (FAR struct rpmsgblk_s *)inode->i_private;
|
||||
FAR struct rpmsgblk_s *priv = inode->i_private;
|
||||
FAR struct rpmsgblk_ioctl_s *msg;
|
||||
uint32_t space;
|
||||
ssize_t arglen;
|
||||
@ -676,7 +676,7 @@ static int rpmsgblk_ioctl(FAR struct inode *inode, int cmd,
|
||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||
static int rpmsgblk_unlink(FAR struct inode *inode)
|
||||
{
|
||||
FAR struct rpmsgblk_s *priv = (FAR struct rpmsgblk_s *)inode->i_private;
|
||||
FAR struct rpmsgblk_s *priv = inode->i_private;
|
||||
struct rpmsgblk_unlink_s msg;
|
||||
int ret;
|
||||
|
||||
|
@ -2044,7 +2044,7 @@ static int mmcsd_open(FAR struct inode *inode)
|
||||
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Just increment the reference count on the driver */
|
||||
|
||||
@ -2075,7 +2075,7 @@ static int mmcsd_close(FAR struct inode *inode)
|
||||
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Decrement the reference count on the block driver */
|
||||
|
||||
@ -2110,7 +2110,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
ssize_t ret = nsectors;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
finfo("startsector: %" PRIuOFF " nsectors: %u sectorsize: %d\n",
|
||||
startsector, nsectors, priv->blocksize);
|
||||
|
||||
@ -2188,7 +2188,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode,
|
||||
ssize_t ret = nsectors;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
finfo("startsector: %" PRIuOFF " nsectors: %u sectorsize: %d\n",
|
||||
startsector, nsectors, priv->blocksize);
|
||||
|
||||
@ -2267,7 +2267,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
|
||||
/* Is there a (supported) card inserted in the slot? */
|
||||
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
ret = mmcsd_lock(priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -2322,7 +2322,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Process the IOCTL by command */
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ static int mmcsd_open(FAR struct inode *inode)
|
||||
|
||||
/* Extract our private data from the inode structure */
|
||||
|
||||
slot = (FAR struct mmcsd_slot_s *)inode->i_private;
|
||||
slot = inode->i_private;
|
||||
spi = slot->spi;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
@ -1188,7 +1188,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
|
||||
/* Extract our private data from the inode structure */
|
||||
|
||||
slot = (FAR struct mmcsd_slot_s *)inode->i_private;
|
||||
slot = inode->i_private;
|
||||
spi = slot->spi;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
@ -1371,7 +1371,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode,
|
||||
|
||||
/* Extract our private data from the inode structure */
|
||||
|
||||
slot = (FAR struct mmcsd_slot_s *)inode->i_private;
|
||||
slot = inode->i_private;
|
||||
spi = slot->spi;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
@ -1575,7 +1575,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
|
||||
/* Extract our private data from the inode structure */
|
||||
|
||||
slot = (FAR struct mmcsd_slot_s *)inode->i_private;
|
||||
slot = inode->i_private;
|
||||
spi = slot->spi;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
|
@ -1129,7 +1129,7 @@ static int alt1250_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
dev = (FAR struct alt1250_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
nxmutex_lock(&dev->refslock);
|
||||
@ -1175,7 +1175,7 @@ static int alt1250_close(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
dev = (FAR struct alt1250_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
nxmutex_lock(&dev->refslock);
|
||||
@ -1220,7 +1220,7 @@ static ssize_t alt1250_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
dev = (FAR struct alt1250_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
if (len != sizeof(struct alt_readdata_s))
|
||||
@ -1245,7 +1245,7 @@ static int alt1250_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
dev = (FAR struct alt1250_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
switch (cmd)
|
||||
@ -1309,7 +1309,7 @@ static int alt1250_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
dev = (FAR struct alt1250_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Are we setting up the poll? Or tearing it down? */
|
||||
|
@ -297,7 +297,7 @@ static int dhara_open(FAR struct inode *inode)
|
||||
FAR dhara_dev_t *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR dhara_dev_t *) inode->i_private;
|
||||
dev = inode->i_private;
|
||||
nxmutex_lock(&dev->lock);
|
||||
dev->refs++;
|
||||
nxmutex_unlock(&dev->lock);
|
||||
@ -317,7 +317,7 @@ static int dhara_close(FAR struct inode *inode)
|
||||
FAR dhara_dev_t *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR dhara_dev_t *) inode->i_private;
|
||||
dev = inode->i_private;
|
||||
nxmutex_lock(&dev->lock);
|
||||
dev->refs--;
|
||||
nxmutex_unlock(&dev->lock);
|
||||
@ -350,7 +350,7 @@ static ssize_t dhara_read(FAR struct inode *inode,
|
||||
int ret = 0;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR dhara_dev_t *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
nxmutex_lock(&dev->lock);
|
||||
while (nsectors-- > 0)
|
||||
@ -394,7 +394,7 @@ static ssize_t dhara_write(FAR struct inode *inode,
|
||||
int ret = 0;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR dhara_dev_t *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
nxmutex_lock(&dev->lock);
|
||||
while (nsectors-- > 0)
|
||||
@ -434,7 +434,7 @@ static int dhara_geometry(FAR struct inode *inode,
|
||||
FAR dhara_dev_t *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR dhara_dev_t *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
if (geometry)
|
||||
{
|
||||
@ -467,7 +467,7 @@ static int dhara_ioctl(FAR struct inode *inode,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (dhara_dev_t *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* No other block driver ioctl commands are not recognized by this
|
||||
* driver. Other possible MTD driver ioctl commands are passed through
|
||||
@ -496,7 +496,7 @@ static int dhara_unlink(FAR struct inode *inode)
|
||||
FAR dhara_dev_t *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR dhara_dev_t *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
nxmutex_lock(&dev->lock);
|
||||
dev->unlinked = true;
|
||||
nxmutex_unlock(&dev->lock);
|
||||
|
@ -213,7 +213,7 @@ static int ftl_open(FAR struct inode *inode)
|
||||
FAR struct ftl_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct ftl_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
dev->refs++;
|
||||
return OK;
|
||||
@ -231,7 +231,7 @@ static int ftl_close(FAR struct inode *inode)
|
||||
FAR struct ftl_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct ftl_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
#ifdef CONFIG_FTL_WRITEBUFFER
|
||||
rwb_flush(&dev->rwb);
|
||||
@ -444,7 +444,7 @@ static ssize_t ftl_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
|
||||
dev = (FAR struct ftl_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
#ifdef FTL_HAVE_RWBUFFER
|
||||
return rwb_read(&dev->rwb, start_sector, nsectors, buffer);
|
||||
#else
|
||||
@ -661,7 +661,7 @@ static ssize_t ftl_write(FAR struct inode *inode,
|
||||
finfo("sector: %" PRIuOFF " nsectors: %u\n", start_sector, nsectors);
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (struct ftl_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
#ifdef FTL_HAVE_RWBUFFER
|
||||
return rwb_write(&dev->rwb, start_sector, nsectors, buffer);
|
||||
#else
|
||||
@ -685,7 +685,7 @@ static int ftl_geometry(FAR struct inode *inode,
|
||||
|
||||
if (geometry)
|
||||
{
|
||||
dev = (struct ftl_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
geometry->geo_available = true;
|
||||
geometry->geo_mediachanged = false;
|
||||
geometry->geo_writeenabled = true;
|
||||
@ -721,7 +721,7 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode->i_private);
|
||||
|
||||
dev = (struct ftl_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
if (cmd == BIOC_FLUSH)
|
||||
{
|
||||
@ -757,7 +757,7 @@ static int ftl_unlink(FAR struct inode *inode)
|
||||
FAR struct ftl_struct_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct ftl_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
dev->unlinked = true;
|
||||
if (dev->refs == 0)
|
||||
|
@ -1809,7 +1809,7 @@ int mtdconfig_unregister(void)
|
||||
}
|
||||
|
||||
inode = file.f_inode;
|
||||
dev = (FAR struct mtdconfig_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
nxmutex_destroy(&dev->lock);
|
||||
kmm_free(dev);
|
||||
|
||||
|
@ -1916,7 +1916,7 @@ static int mtdconfig_ioctl(FAR struct file *filep, int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct nvs_fs *fs = (FAR struct nvs_fs *)inode->i_private;
|
||||
FAR struct nvs_fs *fs = inode->i_private;
|
||||
FAR struct config_data_s *pdata = (FAR struct config_data_s *)arg;
|
||||
int ret = -ENOTTY;
|
||||
|
||||
@ -2089,7 +2089,7 @@ int mtdconfig_unregister_by_path(FAR const char *path)
|
||||
}
|
||||
|
||||
inode = file.f_inode;
|
||||
fs = (FAR struct nvs_fs *)inode->i_private;
|
||||
fs = inode->i_private;
|
||||
nxmutex_destroy(&fs->nvs_lock);
|
||||
kmm_free(fs);
|
||||
file_close(&file);
|
||||
|
@ -907,7 +907,7 @@ static ssize_t smart_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
#ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS
|
||||
dev = ((FAR struct smart_multiroot_device_s *)inode->i_private)->dev;
|
||||
#else
|
||||
dev = (struct smart_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
#endif
|
||||
return smart_reload(dev, buffer, start_sector, nsectors);
|
||||
}
|
||||
@ -943,7 +943,7 @@ static ssize_t smart_write(FAR struct inode *inode,
|
||||
#ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS
|
||||
dev = ((FAR struct smart_multiroot_device_s *)inode->i_private)->dev;
|
||||
#else
|
||||
dev = (FAR struct smart_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
#endif
|
||||
|
||||
/* I think maybe we need to lock on a mutex here */
|
||||
@ -1054,7 +1054,7 @@ static int smart_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
#ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS
|
||||
dev = ((FAR struct smart_multiroot_device_s *)inode->i_private)->dev;
|
||||
#else
|
||||
dev = (FAR struct smart_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
#endif
|
||||
geometry->geo_available = true;
|
||||
geometry->geo_mediachanged = false;
|
||||
@ -5487,7 +5487,7 @@ static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
#ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS
|
||||
dev = ((FAR struct smart_multiroot_device_s *)inode->i_private)->dev;
|
||||
#else
|
||||
dev = (FAR struct smart_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
#endif
|
||||
|
||||
/* Process the ioctl's we care about first, pass any we don't respond
|
||||
@ -6433,7 +6433,7 @@ static int smart_loteardown(FAR const char *devname)
|
||||
|
||||
/* Inode private data is a reference to the loop device structure */
|
||||
|
||||
dev = (FAR struct smart_struct_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Validate this is a filemtd backended device */
|
||||
|
||||
|
@ -469,8 +469,7 @@ static ssize_t noteram_read(FAR struct file *filep, FAR char *buffer,
|
||||
static int noteram_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
int ret = -ENOSYS;
|
||||
FAR struct noteram_driver_s *drv =
|
||||
(FAR struct noteram_driver_s *)filep->f_inode->i_private;
|
||||
FAR struct noteram_driver_s *drv = filep->f_inode->i_private;
|
||||
irqstate_t flags = spin_lock_irqsave_wo_note(&drv->lock);
|
||||
|
||||
/* Handle the ioctl commands */
|
||||
|
@ -888,7 +888,7 @@ int pipecommon_unlink(FAR struct inode *inode)
|
||||
FAR struct pipe_dev_s *dev;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct pipe_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Mark the pipe unlinked */
|
||||
|
||||
|
@ -85,7 +85,7 @@ static ssize_t adxl345_read(FAR struct file *filep,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct adxl345_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the accelerometer data.
|
||||
|
@ -535,7 +535,7 @@ static int aht10_unlink(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct aht10_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -2185,7 +2185,7 @@ static int apds9922_als_poll(FAR struct file *filep,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct apds9922_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
@ -2410,7 +2410,7 @@ static int apds9922_ps_poll(FAR struct file *filep,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct apds9922_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -1137,7 +1137,7 @@ static ssize_t apds9960_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct apds9960_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Check if the user is reading the right size */
|
||||
|
||||
|
@ -180,7 +180,7 @@ static ssize_t bh1750fvi_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct bh1750fvi_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Check if the user is reading the right size */
|
||||
|
||||
|
@ -284,7 +284,7 @@ static int hcsr04_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct hcsr04_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -517,8 +517,7 @@ static int hdc1008_putreg(FAR struct hdc1008_dev_s *priv, uint8_t regaddr,
|
||||
static int hdc1008_open(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct hdc1008_dev_s *priv =
|
||||
(FAR struct hdc1008_dev_s *)inode->i_private;
|
||||
FAR struct hdc1008_dev_s *priv = inode->i_private;
|
||||
int ret;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
@ -549,8 +548,7 @@ static int hdc1008_open(FAR struct file *filep)
|
||||
static int hdc1008_close(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct hdc1008_dev_s *priv =
|
||||
(FAR struct hdc1008_dev_s *)inode->i_private;
|
||||
FAR struct hdc1008_dev_s *priv = inode->i_private;
|
||||
int ret;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
@ -592,8 +590,7 @@ static ssize_t hdc1008_read(FAR struct file *filep, FAR char *buffer,
|
||||
size_t buflen)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct hdc1008_dev_s *priv =
|
||||
(FAR struct hdc1008_dev_s *)inode->i_private;
|
||||
FAR struct hdc1008_dev_s *priv = inode->i_private;
|
||||
int ret;
|
||||
int len = 0;
|
||||
struct hdc1008_conv_data_s data;
|
||||
@ -738,8 +735,7 @@ static ssize_t hdc1008_write(FAR struct file *filep, FAR const char *buffer,
|
||||
static int hdc1008_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct hdc1008_dev_s *priv =
|
||||
(FAR struct hdc1008_dev_s *)inode->i_private;
|
||||
FAR struct hdc1008_dev_s *priv = inode->i_private;
|
||||
int ret;
|
||||
|
||||
/* Get exclusive access */
|
||||
@ -847,7 +843,7 @@ static int hdc1008_unlink(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT((inode != NULL) && (inode->i_private != NULL));
|
||||
priv = (FAR struct hdc1008_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -1067,7 +1067,7 @@ static int hts221_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct hts221_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -483,7 +483,7 @@ static ssize_t kxtj9_read(FAR struct file *filep, FAR char *buffer,
|
||||
DEBUGASSERT(buffer != NULL);
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct kxtj9_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL && priv->i2c != NULL);
|
||||
|
||||
/* Return all of the samples that will fit in the user-provided buffer */
|
||||
@ -540,7 +540,7 @@ static int kxtj9_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct kxtj9_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL && priv->i2c != NULL);
|
||||
|
||||
/* Handle ioctl commands */
|
||||
|
@ -541,7 +541,7 @@ static int lis2dh_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct lis2dh_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&dev->devlock);
|
||||
if (ret < 0)
|
||||
@ -668,7 +668,7 @@ static int lis2dh_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct lis2dh_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&dev->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -956,7 +956,7 @@ static ssize_t lsm303agr_read(FAR struct file *filep,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct lsm303agr_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
DEBUGASSERT(priv->datareg == LSM303AGR_OUTX_L_A_SHIFT ||
|
||||
@ -1077,7 +1077,7 @@ static int lsm303agr_ioctl(FAR struct file *filep, int cmd,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct lsm303agr_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
|
@ -979,7 +979,7 @@ static ssize_t lsm6dsl_read(FAR struct file *filep,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct lsm6dsl_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
DEBUGASSERT(priv->datareg == LSM6DSL_OUTX_L_G_SHIFT ||
|
||||
@ -1099,7 +1099,7 @@ static int lsm6dsl_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct lsm6dsl_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
|
@ -1218,7 +1218,7 @@ static ssize_t lsm9ds1_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct lsm9ds1_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
DEBUGASSERT(priv->datareg == LSM9DS1_OUT_X_L_G ||
|
||||
@ -1339,7 +1339,7 @@ static int lsm9ds1_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct lsm9ds1_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
|
@ -218,7 +218,7 @@ static int max44009_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max44009_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->dev_lock);
|
||||
if (ret < 0)
|
||||
@ -266,7 +266,7 @@ static int max44009_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max44009_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->dev_lock);
|
||||
if (ret < 0)
|
||||
@ -308,7 +308,7 @@ static ssize_t max44009_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max44009_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->dev_lock);
|
||||
if (ret < 0)
|
||||
@ -711,7 +711,7 @@ static int max44009_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max44009_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->dev_lock);
|
||||
if (ret < 0)
|
||||
@ -783,7 +783,7 @@ static int max44009_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct max44009_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->dev_lock);
|
||||
if (ret < 0)
|
||||
|
@ -263,7 +263,7 @@ static ssize_t mlx90614_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct mlx90614_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Check if the user is reading the right size */
|
||||
|
||||
|
@ -481,7 +481,7 @@ static int msa301_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct msa301_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
@ -507,7 +507,7 @@ static int msa301_close(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct msa301_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
@ -537,7 +537,7 @@ static ssize_t msa301_read(FAR struct file *filep,
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct msa301_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
DEBUGASSERT(buffer != NULL);
|
||||
@ -589,7 +589,7 @@ static int msa301_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct msa301_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
|
@ -983,7 +983,7 @@ static int scd30_unlink(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct scd30_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -940,7 +940,7 @@ static int scd41_unlink(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct scd41_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -990,7 +990,7 @@ static int sgp30_unlink(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct sgp30_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -592,7 +592,7 @@ static int sht21_unlink(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct sht21_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -611,7 +611,7 @@ static int sht3x_unlink(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct sht3x_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -1001,7 +1001,7 @@ static int sps30_unlink(FAR struct inode *inode)
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct sps30_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access */
|
||||
|
||||
|
@ -178,7 +178,7 @@ static ssize_t veml6070_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct veml6070_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Check if the user is reading the right size */
|
||||
|
||||
|
@ -104,7 +104,7 @@ static ssize_t xen1210_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct xen1210_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Verify that the caller has provided a buffer large enough to receive
|
||||
* the magnetometer data.
|
||||
|
@ -202,7 +202,7 @@ static int zc_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct zc_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
@ -261,7 +261,7 @@ static int zc_close(FAR struct file *filep)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct zc_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Handle an improbable race conditions with the following atomic test
|
||||
* and set.
|
||||
@ -389,7 +389,7 @@ static int zc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct zc_upperhalf_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the device structures */
|
||||
|
||||
|
@ -126,7 +126,7 @@ static int spidrvr_open(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct spi_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the SPI driver state structure */
|
||||
@ -162,7 +162,7 @@ static int spidrvr_close(FAR struct file *filep)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct spi_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the SPI driver state structure */
|
||||
@ -231,7 +231,7 @@ static int spidrvr_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct spi_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the SPI driver state structure */
|
||||
@ -291,7 +291,7 @@ static int spidrvr_unlink(FAR struct inode *inode)
|
||||
/* Get our private data structure */
|
||||
|
||||
DEBUGASSERT(inode->i_private != NULL);
|
||||
priv = (FAR struct spi_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the SPI driver state structure */
|
||||
|
||||
|
@ -182,7 +182,7 @@ static int spi_slave_open(FAR struct file *filep)
|
||||
/* Get our private data structure */
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (FAR struct spi_slave_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the SPI Slave driver state structure */
|
||||
|
||||
@ -230,7 +230,7 @@ static int spi_slave_close(FAR struct file *filep)
|
||||
/* Get our private data structure */
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (FAR struct spi_slave_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the SPI Slave driver state structure */
|
||||
|
||||
@ -298,7 +298,7 @@ static ssize_t spi_slave_read(FAR struct file *filep, FAR char *buffer,
|
||||
/* Get our private data structure */
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (FAR struct spi_slave_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
if (buffer == NULL)
|
||||
{
|
||||
@ -389,7 +389,7 @@ static ssize_t spi_slave_write(FAR struct file *filep,
|
||||
/* Get our private data structure */
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (FAR struct spi_slave_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->lock);
|
||||
if (ret < 0)
|
||||
@ -444,7 +444,7 @@ static int spi_slave_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
/* Get our private data structure */
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (FAR struct spi_slave_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->lock);
|
||||
if (ret < 0)
|
||||
@ -514,7 +514,7 @@ static int spi_slave_unlink(FAR struct inode *inode)
|
||||
|
||||
/* Get our private data structure */
|
||||
|
||||
priv = (FAR struct spi_slave_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the SPI Slave driver state structure */
|
||||
|
||||
|
@ -461,7 +461,7 @@ static ssize_t ramlog_file_read(FAR struct file *filep, FAR char *buffer,
|
||||
/* Some sanity checking */
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ramlog_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* If the circular buffer is empty, then wait for something to be written
|
||||
* to it. This function may NOT be called from an interrupt handler.
|
||||
@ -623,7 +623,7 @@ static ssize_t ramlog_file_write(FAR struct file *filep,
|
||||
/* Some sanity checking */
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ramlog_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
return ramlog_addbuf(priv, buffer, len);
|
||||
}
|
||||
@ -640,7 +640,7 @@ static int ramlog_file_ioctl(FAR struct file *filep, int cmd,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ramlog_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->rl_lock);
|
||||
if (ret < 0)
|
||||
@ -680,7 +680,7 @@ static int ramlog_file_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
/* Some sanity checking */
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct ramlog_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the poll structures */
|
||||
|
||||
|
@ -305,7 +305,7 @@ static ssize_t syslog_rpmsg_file_read(FAR struct file *filep,
|
||||
/* Some sanity checking */
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct syslog_rpmsg_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
flags = enter_critical_section();
|
||||
if (!priv->suspend && is_rpmsg_ept_ready(&priv->ept))
|
||||
|
@ -157,7 +157,7 @@ static int oneshot_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
tmrinfo("cmd=%d arg=%08lx\n", cmd, (unsigned long)arg);
|
||||
|
||||
inode = filep->f_inode;
|
||||
priv = (FAR struct oneshot_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Get exclusive access to the device structures */
|
||||
|
@ -2363,7 +2363,7 @@ static int usbhost_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
uartdev = (FAR struct uart_dev_s *)inode->i_private;
|
||||
uartdev = inode->i_private;
|
||||
|
||||
DEBUGASSERT(uartdev && uartdev->priv);
|
||||
priv = (FAR struct usbhost_cdcacm_s *)uartdev->priv;
|
||||
|
@ -2309,7 +2309,7 @@ static int usbhost_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
uartdev = (FAR struct uart_dev_s *)inode->i_private;
|
||||
uartdev = inode->i_private;
|
||||
|
||||
DEBUGASSERT(uartdev && uartdev->priv);
|
||||
priv = (FAR struct usbhost_ft232r_s *)uartdev->priv;
|
||||
|
@ -1876,7 +1876,7 @@ static int usbhost_open(FAR struct inode *inode)
|
||||
|
||||
uinfo("Entry\n");
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct usbhost_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Make sure that we have exclusive access to the private data structure */
|
||||
|
||||
@ -1930,7 +1930,7 @@ static int usbhost_close(FAR struct inode *inode)
|
||||
|
||||
uinfo("Entry\n");
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct usbhost_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Decrement the reference count on the block driver */
|
||||
|
||||
@ -1988,7 +1988,7 @@ static ssize_t usbhost_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct usbhost_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv->usbclass.hport);
|
||||
hport = priv->usbclass.hport;
|
||||
@ -2103,7 +2103,7 @@ static ssize_t usbhost_write(FAR struct inode *inode,
|
||||
uinfo("sector: %" PRIuOFF " nsectors: %u\n", startsector, nsectors);
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct usbhost_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
DEBUGASSERT(priv->usbclass.hport);
|
||||
hport = priv->usbclass.hport;
|
||||
@ -2203,7 +2203,7 @@ static int usbhost_geometry(FAR struct inode *inode,
|
||||
|
||||
/* Check if the mass storage device is still connected */
|
||||
|
||||
priv = (FAR struct usbhost_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
if (priv->disconnected)
|
||||
{
|
||||
/* No... the block driver is no longer bound to the class. That means
|
||||
@ -2251,7 +2251,7 @@ static int usbhost_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
|
||||
uinfo("Entry\n");
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct usbhost_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Check if the mass storage device is still connected */
|
||||
|
||||
|
@ -659,7 +659,7 @@ static int fusb301_poll(FAR struct file *filep,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct fusb301_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -1762,7 +1762,7 @@ static int fusb302_poll(FAR struct file *filep,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct fusb302_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -847,7 +847,7 @@ static int fusb303_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct fusb303_dev_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&priv->devlock);
|
||||
if (ret < 0)
|
||||
|
@ -217,7 +217,7 @@ static ssize_t fb_read(FAR struct file *filep, FAR char *buffer, size_t len)
|
||||
/* Get the framebuffer instance */
|
||||
|
||||
inode = filep->f_inode;
|
||||
fb = (FAR struct fb_chardev_s *)inode->i_private;
|
||||
fb = inode->i_private;
|
||||
|
||||
/* Get panel info */
|
||||
|
||||
@ -271,7 +271,7 @@ static ssize_t fb_write(FAR struct file *filep, FAR const char *buffer,
|
||||
/* Get the framebuffer instance */
|
||||
|
||||
inode = filep->f_inode;
|
||||
fb = (FAR struct fb_chardev_s *)inode->i_private;
|
||||
fb = inode->i_private;
|
||||
|
||||
/* Get panel info */
|
||||
|
||||
@ -330,7 +330,7 @@ static off_t fb_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
/* Get the framebuffer instance */
|
||||
|
||||
inode = filep->f_inode;
|
||||
fb = (FAR struct fb_chardev_s *)inode->i_private;
|
||||
fb = inode->i_private;
|
||||
|
||||
/* Determine the new, requested file position */
|
||||
|
||||
@ -409,7 +409,7 @@ static int fb_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
/* Get the framebuffer instance */
|
||||
|
||||
inode = filep->f_inode;
|
||||
fb = (FAR struct fb_chardev_s *)inode->i_private;
|
||||
fb = inode->i_private;
|
||||
|
||||
/* Process the IOCTL command */
|
||||
|
||||
@ -857,7 +857,7 @@ static int fb_mmap(FAR struct file *filep, FAR struct mm_map_entry_s *map)
|
||||
/* Get the framebuffer instance */
|
||||
|
||||
inode = filep->f_inode;
|
||||
fb = (FAR struct fb_chardev_s *)inode->i_private;
|
||||
fb = inode->i_private;
|
||||
|
||||
/* Get panel info */
|
||||
|
||||
@ -896,7 +896,7 @@ static int fb_poll(FAR struct file *filep, struct pollfd *fds, bool setup)
|
||||
/* Get the framebuffer instance */
|
||||
|
||||
inode = filep->f_inode;
|
||||
fb = (FAR struct fb_chardev_s *)inode->i_private;
|
||||
fb = inode->i_private;
|
||||
|
||||
if (setup)
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ static int dsi_dev_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
|
||||
inode = filep->f_inode;
|
||||
|
||||
priv = (FAR struct mipi_dsi_device_driver_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the DSI device driver state structure */
|
||||
|
@ -1046,7 +1046,7 @@ get_connected_imgsensor(FAR struct imgsensor_s **sensors,
|
||||
static int video_open(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR video_mng_t *priv = (FAR video_mng_t *)inode->i_private;
|
||||
FAR video_mng_t *priv = inode->i_private;
|
||||
int ret = OK;
|
||||
|
||||
nxmutex_lock(&priv->lock_open_num);
|
||||
@ -1083,7 +1083,7 @@ static int video_open(FAR struct file *filep)
|
||||
static int video_close(FAR struct file *filep)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR video_mng_t *priv = (FAR video_mng_t *)inode->i_private;
|
||||
FAR video_mng_t *priv = inode->i_private;
|
||||
|
||||
nxmutex_lock(&priv->lock_open_num);
|
||||
|
||||
@ -1125,7 +1125,7 @@ static ssize_t video_write(FAR struct file *filep,
|
||||
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
|
||||
static int video_unlink(FAR struct inode *inode)
|
||||
{
|
||||
FAR video_mng_t *priv = (FAR video_mng_t *)inode->i_private;
|
||||
FAR video_mng_t *priv = inode->i_private;
|
||||
nxmutex_lock(&priv->lock_open_num);
|
||||
if (priv->open_num == 0)
|
||||
{
|
||||
@ -3080,7 +3080,7 @@ static int video_s_ext_ctrls_scene(FAR struct video_mng_s *vmng,
|
||||
static int video_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR video_mng_t *priv = (FAR video_mng_t *)inode->i_private;
|
||||
FAR video_mng_t *priv = inode->i_private;
|
||||
int ret = OK;
|
||||
|
||||
switch (cmd)
|
||||
@ -3236,7 +3236,7 @@ static int video_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
static int video_mmap(FAR struct file *filep, FAR struct mm_map_entry_s *map)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR video_mng_t *priv = (FAR video_mng_t *)inode->i_private;
|
||||
FAR video_mng_t *priv = inode->i_private;
|
||||
FAR video_type_inf_t *type_inf = &priv->video_inf;
|
||||
size_t heapsize = get_heapsize(type_inf);
|
||||
int ret = -EINVAL;
|
||||
@ -3254,7 +3254,7 @@ static int video_mmap(FAR struct file *filep, FAR struct mm_map_entry_s *map)
|
||||
static int video_poll(FAR struct file *filep, struct pollfd *fds, bool setup)
|
||||
{
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR video_mng_t *priv = (FAR video_mng_t *)inode->i_private;
|
||||
FAR video_mng_t *priv = inode->i_private;
|
||||
FAR video_type_inf_t *type_inf;
|
||||
enum v4l2_buf_type buf_type;
|
||||
irqstate_t flags;
|
||||
|
@ -287,7 +287,7 @@ static ssize_t virtio_blk_read(FAR struct inode *inode,
|
||||
FAR struct virtio_blk_priv_s *priv;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct virtio_blk_priv_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
return virtio_blk_rdwr(priv, buffer, startsector, nsectors, false);
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ static ssize_t virtio_blk_write(FAR struct inode *inode,
|
||||
FAR struct virtio_blk_priv_s *priv;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct virtio_blk_priv_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
return virtio_blk_rdwr(priv, (FAR void *)buffer, startsector, nsectors,
|
||||
true);
|
||||
}
|
||||
@ -326,7 +326,7 @@ static int virtio_blk_geometry(FAR struct inode *inode,
|
||||
int ret = -EINVAL;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct virtio_blk_priv_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
if (geometry)
|
||||
{
|
||||
@ -405,7 +405,7 @@ static int virtio_blk_ioctl(FAR struct inode *inode, int cmd,
|
||||
int ret = -ENOTTY;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct virtio_blk_priv_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
|
@ -333,7 +333,7 @@ static int cc1101_file_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct cc1101_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -380,7 +380,7 @@ static int cc1101_file_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct cc1101_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -421,7 +421,7 @@ static ssize_t cc1101_file_write(FAR struct file *filep,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct cc1101_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -532,7 +532,7 @@ static ssize_t cc1101_file_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct cc1101_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&dev->devlock);
|
||||
if (ret < 0)
|
||||
@ -581,7 +581,7 @@ static int cc1101_file_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct cc1101_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Exclusive access */
|
||||
|
||||
|
@ -702,7 +702,7 @@ static ssize_t gs2200m_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct gs2200m_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
ASSERT(1 == len);
|
||||
|
||||
@ -2969,7 +2969,7 @@ static int gs2200m_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct gs2200m_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Lock the device */
|
||||
|
||||
@ -3107,7 +3107,7 @@ static int gs2200m_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct gs2200m_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&dev->dev_lock);
|
||||
if (ret < 0)
|
||||
|
@ -741,7 +741,7 @@ static int sx127x_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct sx127x_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -794,7 +794,7 @@ static int sx127x_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct sx127x_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -837,7 +837,7 @@ static ssize_t sx127x_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct sx127x_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&dev->dev_lock);
|
||||
if (ret < 0)
|
||||
@ -890,7 +890,7 @@ static ssize_t sx127x_write(FAR struct file *filep, FAR const char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct sx127x_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&dev->dev_lock);
|
||||
if (ret < 0)
|
||||
@ -961,7 +961,7 @@ static int sx127x_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct sx127x_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1176,7 +1176,7 @@ static int sx127x_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct sx127x_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Exclusive access */
|
||||
|
||||
|
@ -945,7 +945,7 @@ static int nrf24l01_open(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct nrf24l01_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -988,7 +988,7 @@ static int nrf24l01_close(FAR struct file *filep)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct nrf24l01_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1022,7 +1022,7 @@ static ssize_t nrf24l01_read(FAR struct file *filep, FAR char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct nrf24l01_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&dev->devlock);
|
||||
if (ret < 0)
|
||||
@ -1072,7 +1072,7 @@ static ssize_t nrf24l01_write(FAR struct file *filep, FAR const char *buffer,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct nrf24l01_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
ret = nxmutex_lock(&dev->devlock);
|
||||
if (ret < 0)
|
||||
@ -1100,7 +1100,7 @@ static int nrf24l01_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct nrf24l01_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver data structure */
|
||||
|
||||
@ -1361,7 +1361,7 @@ static int nrf24l01_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
inode = filep->f_inode;
|
||||
|
||||
DEBUGASSERT(inode->i_private);
|
||||
dev = (FAR struct nrf24l01_dev_s *)inode->i_private;
|
||||
dev = inode->i_private;
|
||||
|
||||
/* Exclusive access */
|
||||
|
||||
|
@ -1097,7 +1097,7 @@ static int cromfs_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
fs = (FAR struct cromfs_volume_s *)oldp->f_inode->i_private;
|
||||
fs = oldp->f_inode->i_private;
|
||||
DEBUGASSERT(fs != NULL);
|
||||
|
||||
/* Get the open file instance from the file structure */
|
||||
|
@ -1476,7 +1476,7 @@ static int fat_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
fs = (struct fat_mountpt_s *)oldp->f_inode->i_private;
|
||||
fs = oldp->f_inode->i_private;
|
||||
|
||||
DEBUGASSERT(fs != NULL);
|
||||
|
||||
|
@ -254,7 +254,7 @@ static int automount_close(FAR struct file *filep)
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct automounter_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
@ -321,7 +321,7 @@ static int automount_ioctl(FAR struct file *filep, int cmd,
|
||||
opriv = filep->f_priv;
|
||||
inode = filep->f_inode;
|
||||
DEBUGASSERT(inode->i_private);
|
||||
priv = (FAR struct automounter_state_s *)inode->i_private;
|
||||
priv = inode->i_private;
|
||||
|
||||
/* Get exclusive access to the driver structure */
|
||||
|
||||
|
@ -659,7 +659,7 @@ static int nfs_open(FAR struct file *filep, FAR const char *relpath,
|
||||
* mountpoint private data from the inode structure
|
||||
*/
|
||||
|
||||
nmp = (FAR struct nfsmount *)filep->f_inode->i_private;
|
||||
nmp = filep->f_inode->i_private;
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
|
||||
/* Pre-allocate the file private data to describe the opened file. */
|
||||
@ -777,7 +777,7 @@ static int nfs_close(FAR struct file *filep)
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
nmp = (FAR struct nfsmount *)filep->f_inode->i_private;
|
||||
nmp = filep->f_inode->i_private;
|
||||
np = (FAR struct nfsnode *)filep->f_priv;
|
||||
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
@ -880,7 +880,7 @@ static ssize_t nfs_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
nmp = (FAR struct nfsmount *)filep->f_inode->i_private;
|
||||
nmp = filep->f_inode->i_private;
|
||||
np = (FAR struct nfsnode *)filep->f_priv;
|
||||
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
@ -1055,7 +1055,7 @@ static ssize_t nfs_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
nmp = (FAR struct nfsmount *)filep->f_inode->i_private;
|
||||
nmp = filep->f_inode->i_private;
|
||||
np = (FAR struct nfsnode *)filep->f_priv;
|
||||
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
@ -1232,7 +1232,7 @@ static off_t nfs_seek(FAR struct file *filep, off_t offset, int whence)
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
nmp = (FAR struct nfsmount *)filep->f_inode->i_private;
|
||||
nmp = filep->f_inode->i_private;
|
||||
np = (FAR struct nfsnode *)filep->f_priv;
|
||||
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
@ -1311,7 +1311,7 @@ static int nfs_dup(FAR const struct file *oldp, FAR struct file *newp)
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
nmp = (FAR struct nfsmount *)oldp->f_inode->i_private;
|
||||
nmp = oldp->f_inode->i_private;
|
||||
np = (FAR struct nfsnode *)oldp->f_priv;
|
||||
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
@ -1358,7 +1358,7 @@ static int nfs_fstat(FAR const struct file *filep, FAR struct stat *buf)
|
||||
DEBUGASSERT(filep->f_priv != NULL);
|
||||
np = (FAR struct nfsnode *)filep->f_priv;
|
||||
|
||||
nmp = (FAR struct nfsmount *)filep->f_inode->i_private;
|
||||
nmp = filep->f_inode->i_private;
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
|
||||
memset(buf, 0, sizeof(*buf));
|
||||
@ -1410,7 +1410,7 @@ static int nfs_fchstat(FAR const struct file *filep,
|
||||
DEBUGASSERT(filep->f_priv != NULL);
|
||||
np = (FAR struct nfsnode *)filep->f_priv;
|
||||
|
||||
nmp = (FAR struct nfsmount *)filep->f_inode->i_private;
|
||||
nmp = filep->f_inode->i_private;
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
|
||||
ret = nxmutex_lock(&nmp->nm_lock);
|
||||
@ -1447,7 +1447,7 @@ static int nfs_truncate(FAR struct file *filep, off_t length)
|
||||
|
||||
/* Recover our private data from the struct file instance */
|
||||
|
||||
nmp = (FAR struct nfsmount *)filep->f_inode->i_private;
|
||||
nmp = filep->f_inode->i_private;
|
||||
np = (FAR struct nfsnode *)filep->f_priv;
|
||||
|
||||
DEBUGASSERT(nmp != NULL);
|
||||
@ -2380,7 +2380,7 @@ static int nfs_statfs(FAR struct inode *mountpt, FAR struct statfs *sbp)
|
||||
|
||||
/* Get the mountpoint private data from the inode structure */
|
||||
|
||||
nmp = (FAR struct nfsmount *)mountpt->i_private;
|
||||
nmp = mountpt->i_private;
|
||||
|
||||
ret = nxmutex_lock(&nmp->nm_lock);
|
||||
if (ret < 0)
|
||||
@ -2452,7 +2452,7 @@ static int nfs_remove(FAR struct inode *mountpt, FAR const char *relpath)
|
||||
|
||||
/* Get the mountpoint private data from the inode structure */
|
||||
|
||||
nmp = (FAR struct nfsmount *)mountpt->i_private;
|
||||
nmp = mountpt->i_private;
|
||||
|
||||
ret = nxmutex_lock(&nmp->nm_lock);
|
||||
if (ret < 0)
|
||||
@ -2535,7 +2535,7 @@ static int nfs_mkdir(FAR struct inode *mountpt, FAR const char *relpath,
|
||||
|
||||
/* Get the mountpoint private data from the inode structure */
|
||||
|
||||
nmp = (FAR struct nfsmount *)mountpt->i_private;
|
||||
nmp = mountpt->i_private;
|
||||
|
||||
ret = nxmutex_lock(&nmp->nm_lock);
|
||||
if (ret < 0)
|
||||
@ -2660,7 +2660,7 @@ static int nfs_rmdir(FAR struct inode *mountpt, FAR const char *relpath)
|
||||
|
||||
/* Get the mountpoint private data from the inode structure */
|
||||
|
||||
nmp = (FAR struct nfsmount *)mountpt->i_private;
|
||||
nmp = mountpt->i_private;
|
||||
|
||||
ret = nxmutex_lock(&nmp->nm_lock);
|
||||
if (ret < 0)
|
||||
@ -2746,7 +2746,7 @@ static int nfs_rename(FAR struct inode *mountpt, FAR const char *oldrelpath,
|
||||
|
||||
/* Get the mountpoint private data from the inode structure */
|
||||
|
||||
nmp = (FAR struct nfsmount *)mountpt->i_private;
|
||||
nmp = mountpt->i_private;
|
||||
|
||||
ret = nxmutex_lock(&nmp->nm_lock);
|
||||
if (ret < 0)
|
||||
@ -2916,7 +2916,7 @@ static int nfs_stat(FAR struct inode *mountpt, FAR const char *relpath,
|
||||
|
||||
/* Get the mountpoint private data from the inode structure */
|
||||
|
||||
nmp = (FAR struct nfsmount *)mountpt->i_private;
|
||||
nmp = mountpt->i_private;
|
||||
DEBUGASSERT(nmp && buf);
|
||||
|
||||
memset(buf, 0, sizeof(*buf));
|
||||
@ -2983,7 +2983,7 @@ static int nfs_chstat(FAR struct inode *mountpt, FAR const char *relpath,
|
||||
|
||||
/* Get the mountpoint private data from the inode structure */
|
||||
|
||||
nmp = (FAR struct nfsmount *)mountpt->i_private;
|
||||
nmp = mountpt->i_private;
|
||||
DEBUGASSERT(nmp && buf);
|
||||
|
||||
ret = nxmutex_lock(&nmp->nm_lock);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user