power: vm-bms: Update vm-bms to support 64 bit

Add compat_ioctl in batterdata-interface to support 64-bit kernel
and 32-bit userspace.
Fix return type of vm_bms_read operation.

Change-Id: I56dca1fb8e17e52ca27aa722c3a17dd845959421
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
This commit is contained in:
Ashay Jaiswal 2014-04-02 11:29:26 +05:30
parent 27a707958c
commit 689255a05c
2 changed files with 3 additions and 2 deletions

View file

@ -129,7 +129,8 @@ static int battery_data_release(struct inode *inode, struct file *file)
static const struct file_operations battery_data_fops = {
.owner = THIS_MODULE,
.open = battery_data_open,
.unlocked_ioctl = battery_data_ioctl,
.unlocked_ioctl = battery_data_ioctl,
.compat_ioctl = battery_data_ioctl,
.release = battery_data_release,
};

View file

@ -1988,7 +1988,7 @@ static int bms_load_hw_defaults(struct qpnp_bms_chip *chip)
return 0;
}
static int vm_bms_read(struct file *file, char __user *buf, size_t count,
static ssize_t vm_bms_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos)
{
int rc;