Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
oplus: Fix duplicate registration of /proc/ftm_tfa98xx
Multiple tfa chips does exist on one device, we shouldn't create it every time on drivers probe. Make it only run once to fix the kernel warning. [ 1.457908] proc_dir_entry '/proc/ftm_tfa98xx' already registered [ 1.457933] WARNING: CPU: 1 PID: 1 at fs/proc/generic.c:360 proc_register+0x10c/0x180 [ 1.457941] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S W 4.19.157-Horizon-04171222 #6 [ 1.457945] Hardware name: Qualcomm Technologies, Inc. kona MTP 19805 (DT) [ 1.457951] pstate: 60800005 (nZCv daif -PAN +UAO) [ 1.457956] pc : proc_register+0x10c/0x180 [ 1.457961] lr : proc_register+0x104/0x180 [ 1.457964] pc : ffffff968ed47da4 [ 1.457968] lr : ffffff968ed47d9c [ 1.457972] sp : ffffff800805bae0 [ 1.457975] x29: ffffff800805bae0 x28: 0000000000000000 [ 1.457981] x27: 0000000000000000 x26: 0000000000000000 [ 1.457986] x25: ffffff9692d53000 x24: ffffff9692d53000 [ 1.457990] x23: 0000000000000000 x22: ffffffebf669ab18 [ 1.457996] x21: ffffff9691a5cee0 x20: ffffff9691a5ce60 [ 1.458001] x19: ffffffed58a84180 x18: ffffff969265b000 [ 1.458005] x17: 00000000007d6990 x16: 00000000000000c4 [ 1.458010] x15: ffffff9690643c7c x14: 6572657473696765 [ 1.458015] x13: 0000000000000212 x12: 0000000000000000 [ 1.458020] x11: 0000000000000000 x10: ffffffffffffffff [ 1.458025] x9 : d0a22079345ec400 x8 : d0a22079345ec400 [ 1.458029] x7 : 393735342e312020 x6 : ffffffed599b3d50 [ 1.458034] x5 : 0000000000000000 x4 : 0000000000000003 [ 1.458039] x3 : 0000000000000045 x2 : 0000000000000001 [ 1.458043] x1 : 0000000000000000 x0 : ffffff9692682710 [ 1.458050] Call trace: [ 1.458055] proc_register+0x10c/0x180 [ 1.458060] proc_create_data+0x88/0xc0 [ 1.458067] tfa98xx_i2c_probe+0x6a8/0xa08 [ 1.458075] i2c_device_probe+0x230/0x278 [ 1.458081] really_probe+0x270/0x2f4 [ 1.458085] driver_probe_device+0x60/0xf8 [ 1.458090] __driver_attach+0xe8/0x124 [ 1.458095] bus_for_each_dev+0x78/0xc0 [ 1.458100] driver_attach+0x20/0x28 [ 1.458104] bus_add_driver+0x128/0x20c [ 1.458108] driver_register+0x74/0x108 [ 1.458114] i2c_register_driver+0x3c/0x9c [ 1.458120] tfa98xx_i2c_init+0x60/0x80 [ 1.458125] do_one_initcall+0xd0/0x210 [ 1.458130] do_initcall_level+0x13c/0x164 [ 1.458134] do_basic_setup+0x48/0x94 [ 1.458138] kernel_init_freeable+0xac/0x144 [ 1.458147] kernel_init+0x14/0x2b0 [ 1.458153] ret_from_fork+0x10/0x18 Signed-off-by: LibXZR <[email protected]>
- Loading branch information