]> www.infradead.org Git - users/jedix/linux-maple.git/commit
extcon: sm5502: Drop invalid register write in sm5502_reg_data
authorStephan Gerhold <stephan@gerhold.net>
Mon, 31 May 2021 13:34:35 +0000 (15:34 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 1 Jun 2021 15:57:42 +0000 (00:57 +0900)
commit999bcbf0ac0c7ce6e0f917f0edb13da4c2009076
tree77c3963f61f8a5d5e9fdcb91c4eb400438d2bce8
parent1f4747b2b14947f6363b977d30889b00afae3d81
extcon: sm5502: Drop invalid register write in sm5502_reg_data

When sm5502_init_dev_type() iterates over sm5502_reg_data to
initialize the registers it is limited by ARRAY_SIZE(sm5502_reg_data).
There is no need to add another empty element to sm5502_reg_data.

Having the additional empty element in sm5502_reg_data will just
result in writing 0xff to register 0x00, which does not really
make sense.

Fixes: 914b881f9452 ("extcon: sm5502: Add support new SM5502 extcon device driver")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-sm5502.c