aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/unittest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/unittest.c')
-rw-r--r--drivers/of/unittest.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 0cf9a236d438..eaef89e8358b 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -979,7 +979,7 @@ static int of_path_platform_device_exists(const char *path)
979 return pdev != NULL; 979 return pdev != NULL;
980} 980}
981 981
982#if IS_ENABLED(CONFIG_I2C) 982#if IS_BUILTIN(CONFIG_I2C)
983 983
984/* get the i2c client device instantiated at the path */ 984/* get the i2c client device instantiated at the path */
985static struct i2c_client *of_path_to_i2c_client(const char *path) 985static struct i2c_client *of_path_to_i2c_client(const char *path)
@@ -1445,7 +1445,7 @@ static void of_selftest_overlay_11(void)
1445 return; 1445 return;
1446} 1446}
1447 1447
1448#if IS_ENABLED(CONFIG_I2C) && IS_ENABLED(CONFIG_OF_OVERLAY) 1448#if IS_BUILTIN(CONFIG_I2C) && IS_ENABLED(CONFIG_OF_OVERLAY)
1449 1449
1450struct selftest_i2c_bus_data { 1450struct selftest_i2c_bus_data {
1451 struct platform_device *pdev; 1451 struct platform_device *pdev;
@@ -1584,7 +1584,7 @@ static struct i2c_driver selftest_i2c_dev_driver = {
1584 .id_table = selftest_i2c_dev_id, 1584 .id_table = selftest_i2c_dev_id,
1585}; 1585};
1586 1586
1587#if IS_ENABLED(CONFIG_I2C_MUX) 1587#if IS_BUILTIN(CONFIG_I2C_MUX)
1588 1588
1589struct selftest_i2c_mux_data { 1589struct selftest_i2c_mux_data {
1590 int nchans; 1590 int nchans;
@@ -1695,7 +1695,7 @@ static int of_selftest_overlay_i2c_init(void)
1695 "could not register selftest i2c bus driver\n")) 1695 "could not register selftest i2c bus driver\n"))
1696 return ret; 1696 return ret;
1697 1697
1698#if IS_ENABLED(CONFIG_I2C_MUX) 1698#if IS_BUILTIN(CONFIG_I2C_MUX)
1699 ret = i2c_add_driver(&selftest_i2c_mux_driver); 1699 ret = i2c_add_driver(&selftest_i2c_mux_driver);
1700 if (selftest(ret == 0, 1700 if (selftest(ret == 0,
1701 "could not register selftest i2c mux driver\n")) 1701 "could not register selftest i2c mux driver\n"))
@@ -1707,7 +1707,7 @@ static int of_selftest_overlay_i2c_init(void)
1707 1707
1708static void of_selftest_overlay_i2c_cleanup(void) 1708static void of_selftest_overlay_i2c_cleanup(void)
1709{ 1709{
1710#if IS_ENABLED(CONFIG_I2C_MUX) 1710#if IS_BUILTIN(CONFIG_I2C_MUX)
1711 i2c_del_driver(&selftest_i2c_mux_driver); 1711 i2c_del_driver(&selftest_i2c_mux_driver);
1712#endif 1712#endif
1713 platform_driver_unregister(&selftest_i2c_bus_driver); 1713 platform_driver_unregister(&selftest_i2c_bus_driver);
@@ -1814,7 +1814,7 @@ static void __init of_selftest_overlay(void)
1814 of_selftest_overlay_10(); 1814 of_selftest_overlay_10();
1815 of_selftest_overlay_11(); 1815 of_selftest_overlay_11();
1816 1816
1817#if IS_ENABLED(CONFIG_I2C) 1817#if IS_BUILTIN(CONFIG_I2C)
1818 if (selftest(of_selftest_overlay_i2c_init() == 0, "i2c init failed\n")) 1818 if (selftest(of_selftest_overlay_i2c_init() == 0, "i2c init failed\n"))
1819 goto out; 1819 goto out;
1820 1820