提交 c2b2a47f 编写于 作者: W wangchenyang 提交者: mamingshuai

Description:vfs refactoring

Feature or Bugfix:Feature
Binary Source:Huawei
PrivateCode(Yes/No):Yes

Change-Id: I175d2648bc6f9078c34de2c0a5c93fda10b86c47
ChangeID:13306404
上级 45f9beb9
......@@ -1351,7 +1351,7 @@ tty_usb_write_wait(void)
static int
tty_usb_open(struct file *filep)
{
struct ucom_softc *sc = (struct ucom_softc *)filep->f_inode->i_private;
struct ucom_softc *sc = (struct ucom_softc *)((struct drv_data*)filep->f_vnode->data)->priv;
int ret;
UCOM_MTX_LOCK(sc);
......@@ -1369,7 +1369,7 @@ tty_usb_open(struct file *filep)
static int
tty_usb_close(struct file *filep)
{
struct ucom_softc *sc = (struct ucom_softc *)filep->f_inode->i_private;
struct ucom_softc *sc = (struct ucom_softc *)((struct drv_data*)filep->f_vnode->data)->priv;
UCOM_MTX_LOCK(sc);
tty_usb_queue_delete();
......@@ -1382,7 +1382,7 @@ tty_usb_close(struct file *filep)
static ssize_t
tty_usb_read(struct file *filep, char *buffer, size_t buflen)
{
struct ucom_softc *sc = (struct ucom_softc *)filep->f_inode->i_private;
struct ucom_softc *sc = (struct ucom_softc *)((struct drv_data*)filep->f_vnode->data)->priv;
int read_len = -1;
int ret;
UCOM_MTX_LOCK(sc);
......@@ -1440,7 +1440,7 @@ tty_usb_read(struct file *filep, char *buffer, size_t buflen)
static ssize_t
tty_usb_write(struct file *filep, const char *buffer, size_t buflen)
{
struct ucom_softc *sc = (struct ucom_softc *)filep->f_inode->i_private;
struct ucom_softc *sc = (struct ucom_softc *)((struct drv_data*)filep->f_vnode->data)->priv;
tx_data_copy_in(sc, (void *)buffer, buflen);
ucom_outwakeup(sc);
......
......@@ -3158,25 +3158,25 @@ umass_status(void)
}
static int
umass_open(FAR struct inode *filep)
umass_open(FAR struct Vnode *filep)
{
(void)filep;
return (0);
}
static int
umass_close(FAR struct inode *filep)
umass_close(FAR struct Vnode *filep)
{
(void)filep;
return (0);
}
static ssize_t
umass_read(FAR struct inode *umass_inode, FAR unsigned char *buffer,
umass_read(FAR struct Vnode *umass_inode, FAR unsigned char *buffer,
uint64_t start_sector, unsigned int nsectors)
{
int status;
struct umass_softc *sc = (struct umass_softc *)umass_inode->i_private;
struct umass_softc *sc = (struct umass_softc *)((struct drv_data*)umass_inode->data)->priv;
mtx_lock(&sc->sc_umass_mtx);
if (sc->sc_super_disk == TRUE) {
......@@ -3193,11 +3193,11 @@ umass_read(FAR struct inode *umass_inode, FAR unsigned char *buffer,
}
static ssize_t
umass_write(FAR struct inode *umass_inode, FAR const unsigned char *buffer,
umass_write(FAR struct Vnode *umass_inode, FAR const unsigned char *buffer,
uint64_t start_sector, unsigned int nsectors)
{
int status;
struct umass_softc *sc = (struct umass_softc *)umass_inode->i_private;
struct umass_softc *sc = (struct umass_softc *)((struct drv_data*)umass_inode->data)->priv;
mtx_lock(&sc->sc_umass_mtx);
if (sc->sc_super_disk == TRUE) {
......@@ -3214,14 +3214,14 @@ umass_write(FAR struct inode *umass_inode, FAR const unsigned char *buffer,
}
static int
umass_geometry(FAR struct inode *umass_inode, FAR struct geometry *ugeometry)
umass_geometry(FAR struct Vnode *umass_inode, FAR struct geometry *ugeometry)
{
struct umass_softc *sc;
if ((ugeometry == NULL) || (umass_inode == NULL))
return (-1);
sc = (struct umass_softc *)umass_inode->i_private;
sc = (struct umass_softc *)(struct umass_softc *)((struct drv_data*)umass_inode->data)->priv;
if (sc == NULL)
return (-1);
......@@ -3238,7 +3238,7 @@ umass_geometry(FAR struct inode *umass_inode, FAR struct geometry *ugeometry)
}
static int
umass_ioctl(FAR struct inode *umass_inode, int cmd, unsigned long arg)
umass_ioctl(FAR struct Vnode *umass_inode, int cmd, unsigned long arg)
{
(void)umass_inode;
(void)cmd;
......
......@@ -781,7 +781,7 @@ usb_fifo_close(struct usb_fifo *f, int fflags)
static int
usb_open(struct file *filep)
{
struct usb_fs_privdata* pd = (struct usb_fs_privdata*)filep->f_inode->i_private;
struct usb_fs_privdata* pd = (struct usb_fs_privdata*)((struct drv_data*)filep->f_vnode->data)->priv;
struct usb_cdev_refdata refs;
struct usb_cdev_privdata *cpd = NULL;
int err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册