mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
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:
parent
7ee1f7369b
commit
1600284580
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue