File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 22
22
#include <linux/module.h>
23
23
#include <linux/of.h>
24
24
#include <linux/pm_runtime.h>
25
+ #include <linux/property.h>
25
26
#include <linux/regmap.h>
26
27
#include <linux/swab.h>
27
28
#include <linux/types.h>
@@ -372,14 +373,15 @@ int i2c_dw_fw_parse_and_configure(struct dw_i2c_dev *dev)
372
373
{
373
374
struct i2c_timings * t = & dev -> timings ;
374
375
struct device * device = dev -> dev ;
376
+ struct fwnode_handle * fwnode = dev_fwnode (device );
375
377
376
378
i2c_parse_fw_timings (device , t , false);
377
379
378
380
i2c_dw_adjust_bus_speed (dev );
379
381
380
- if (device -> of_node )
382
+ if (is_of_node ( fwnode ) )
381
383
i2c_dw_of_configure (device );
382
- if (has_acpi_companion ( device ))
384
+ else if (is_acpi_node ( fwnode ))
383
385
i2c_dw_acpi_configure (device );
384
386
385
387
return i2c_dw_validate_speed (dev );
You can’t perform that action at this time.
0 commit comments