Change i2c_driver remove function from int to void

After Linux kernel version 6.1.0, i2c_driver remove function has no return
instead of int. So change it for compatible

Change-Id: Ic175cd2201d11c68d681add621886a168ec54a90
Signed-off-by: zhuangnk1 <zhuangnk1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2775981
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Reviewed-by: Jun Zhang <zhangj10@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
zhuangnk1 2023-10-25 13:57:10 +08:00 • committed by Ningkai Zhuang
commit 1600284580

View file

@ -983,7 +983,11 @@ err_exit:
return ret;
}
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
static int st21nfc_remove(struct i2c_client *client)
#else
static void st21nfc_remove(struct i2c_client *client)
#endif
{
struct st21nfc_dev *st21nfc_dev;
@ -1002,8 +1006,9 @@ static int st21nfc_remove(struct i2c_client *client)
kfree(st21nfc_dev->write_buf);
kfree(st21nfc_dev->read_buf);
kfree(st21nfc_dev);
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
return 0;
#endif
}
static int st21nfc_suspend(struct device *device)