charger: remove write permission from interface without "store"

Some device attributes do not have the interface of store. If we reguard
it as permission writable. We would get following errors:
[   22.517191] Attribute vbus: write permission without 'store'
[   22.522882] WARNING: CPU: 6 PID: 375 at drivers/base/core.c:2283 device_create_file+0x78/0x9c
[[   22.619397] Hardware name: miami (DT)
[   22.623067] pstate: 60400005 (nZCv daif +PAN -UAO)
[   22.627864] pc : device_create_file+0x78/0x9c
[   22.632219] lr : device_create_file+0x78/0x9c

Change-Id: I7497b33aff38cc122825b44623a03bd2765b3a83
Reviewed-on: https://gerrit.mot.com/2237072
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
weiweij 2022-04-08 14:04:11 +08:00 • committed by Wei Wei
commit 21eb62de55

View file

@ -1877,7 +1877,7 @@ static ssize_t show_reg_dump(struct device *dev, struct device_attribute *attr,
return size;
}
static DEVICE_ATTR(reg_dump, 0664, show_reg_dump, NULL);
static DEVICE_ATTR(reg_dump, 0444, show_reg_dump, NULL);
static ssize_t show_vbus(struct device *dev, struct device_attribute *attr, char *buf)
{
@ -1891,7 +1891,7 @@ static ssize_t show_vbus(struct device *dev, struct device_attribute *attr, char
return sprintf(buf, "%d\n", vbus);
}
static DEVICE_ATTR(vbus, 0664, show_vbus, NULL);
static DEVICE_ATTR(vbus, 0444, show_vbus, NULL);
static void bq25980_create_device_node(struct device *dev)
{