mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
fix build err for new Kernel version
moto_f_mass_storage.ko build error: storage_common.c:218:20: error: no member named 'i_bdev' in 'struct inode' Change-Id: I1d0bde9c0f60a8147ea4f8668cdc0240ed35ac3c Signed-off-by: yanyh2 <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/2252051 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
6cdc32108e
commit
0b1ff3b85e
1 changed files with 4 additions and 4 deletions
|
|
@ -188,7 +188,7 @@ int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
|
|||
if (!(filp->f_mode & FMODE_WRITE))
|
||||
ro = 1;
|
||||
|
||||
inode = file_inode(filp);
|
||||
inode = filp->f_mapping->host;
|
||||
if ((!S_ISREG(inode->i_mode) && !S_ISBLK(inode->i_mode))) {
|
||||
LINFO(curlun, "invalid file type: %s\n", filename);
|
||||
goto out;
|
||||
|
|
@ -205,7 +205,7 @@ int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
|
|||
if (!(filp->f_mode & FMODE_CAN_WRITE))
|
||||
ro = 1;
|
||||
|
||||
size = i_size_read(inode->i_mapping->host);
|
||||
size = i_size_read(inode);
|
||||
if (size < 0) {
|
||||
LINFO(curlun, "unable to find file size: %s\n", filename);
|
||||
rc = (int) size;
|
||||
|
|
@ -215,8 +215,8 @@ int fsg_lun_open(struct fsg_lun *curlun, const char *filename)
|
|||
if (curlun->cdrom) {
|
||||
blksize = 2048;
|
||||
blkbits = 11;
|
||||
} else if (inode->i_bdev) {
|
||||
blksize = bdev_logical_block_size(inode->i_bdev);
|
||||
} else if (S_ISBLK(inode->i_mode)) {
|
||||
blksize = bdev_logical_block_size(I_BDEV(inode));
|
||||
blkbits = blksize_bits(blksize);
|
||||
} else {
|
||||
blksize = 512;
|
||||
|
|
|
|||
Loading…
Reference in a new issue