mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
inode/i_private: remove all unnecessary cast for i_private
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
+1
-1
@@ -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? */
|
||||
|
||||
|
||||
+5
-5
@@ -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? */
|
||||
|
||||
+7
-7
@@ -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);
|
||||
|
||||
+7
-7
@@ -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);
|
||||
|
||||
+5
-5
@@ -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 */
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user