Assign owner/group for cp_temp after the kernel module is loaded.

The chown operation on the cp_temp sysfs attribute needs to happen after
the cp_thermal_zone driver has been loaded by the insmod_sh service.
If not, the owner/group won't be updated and after the driver gets
loaded, cp_temp will default to root/root. Hence, we are moving this
operation from init to the post-fs-data stage.

Test: Verified owner/group for the sysfs attribute
Bug: 267485434
Change-Id: Ib463dd5f2de332164714a77bdb0302afeaad5217
Signed-off-by: Mahesh Kallelil <kallelil@google.com>
This commit is contained in:
Mahesh Kallelil 2023-03-21 15:55:48 -07:00
parent e46e4914a4
commit 8eab233dba

View file

@ -223,9 +223,6 @@ on init
chown system system /dev/battery_history
chmod 0644 /dev/battery_history
# Modem temperature driver
chown radio system /sys/devices/platform/cp-tm1/cp_temp
# Loading common kernel modules in background
start init_display
@ -347,6 +344,9 @@ on late-fs
mount_all --late
on post-fs-data
# Modem temperature driver
chown radio system /sys/devices/platform/cp-tm1/cp_temp
# Log data folder
mkdir /data/vendor 0771 radio system
mkdir /data/vendor/log 0771 radio system