mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
misc: rk628: Compatible with both kernel-5.10 and kernel-6.1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com> Change-Id: Ib170fb0b1a03a211564c88aaad62aa6adf2dd1b1
This commit is contained in:
@@ -1528,7 +1528,11 @@ err_clk:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE
|
||||
static void rk628_i2c_remove(struct i2c_client *client)
|
||||
#else
|
||||
static int rk628_i2c_remove(struct i2c_client *client)
|
||||
#endif
|
||||
{
|
||||
struct rk628 *rk628 = i2c_get_clientdata(client);
|
||||
struct device *dev = &client->dev;
|
||||
@@ -1548,8 +1552,9 @@ static int rk628_i2c_remove(struct i2c_client *client)
|
||||
destroy_workqueue(rk628->monitor_wq);
|
||||
pm_runtime_disable(dev);
|
||||
clk_disable_unprepare(rk628->soc_24M);
|
||||
|
||||
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef CONFIG_FB
|
||||
|
||||
@@ -611,7 +611,12 @@ static int rk628_hdmi_connector_get_modes(struct drm_connector *connector)
|
||||
|
||||
ret = rockchip_drm_add_modes_noedid(connector);
|
||||
|
||||
#if KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE
|
||||
info->edid_hdmi_ycbcr444_dc_modes = 0;
|
||||
info->edid_hdmi_rgb444_dc_modes = 0;
|
||||
#else
|
||||
info->edid_hdmi_dc_modes = 0;
|
||||
#endif
|
||||
info->hdmi.y420_dc_modes = 0;
|
||||
info->color_formats = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user