Skip to content

Commit 577c1e0

Browse files
Pratap NirujogiAndi Shyti
authored andcommitted
platform/x86: Use i2c adapter name to fix build errors
Use adapater->name inplace of adapter->owner->name to fix build issues when CONFIG_MODULES is not defined. Fixes: 90b8556 ("platform/x86: Add AMD ISP platform config for OV05C10") Reported-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/all/[email protected] Tested-by: Randy Dunlap <[email protected]> Signed-off-by: Pratap Nirujogi <[email protected]> Requires: 942e1ae ("i2c: designware: Initialize adapter name only when not set" Requires: c8dc579 ("i2c: amd-isp: Initialize unique adapter name") Acked-by: Ilpo Järvinen <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c8dc579 commit 577c1e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/platform/x86/amd/amd_isp4.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/mutex.h>
1212
#include <linux/platform_device.h>
1313
#include <linux/property.h>
14+
#include <linux/soc/amd/isp4_misc.h>
1415
#include <linux/string.h>
1516
#include <linux/types.h>
1617
#include <linux/units.h>
@@ -151,7 +152,7 @@ MODULE_DEVICE_TABLE(acpi, amdisp_sensor_ids);
151152

152153
static inline bool is_isp_i2c_adapter(struct i2c_adapter *adap)
153154
{
154-
return !strcmp(adap->owner->name, "i2c_designware_amdisp");
155+
return !strcmp(adap->name, AMDISP_I2C_ADAP_NAME);
155156
}
156157

157158
static void instantiate_isp_i2c_client(struct amdisp_platform *isp4_platform,

0 commit comments

Comments
 (0)