@@ -1123,29 +1123,15 @@ static int omap_iommu_dra7_get_dsp_system_cfg(struct platform_device *pdev,
1123
1123
struct omap_iommu * obj )
1124
1124
{
1125
1125
struct device_node * np = pdev -> dev .of_node ;
1126
- int ret ;
1127
1126
1128
1127
if (!of_device_is_compatible (np , "ti,dra7-dsp-iommu" ))
1129
1128
return 0 ;
1130
1129
1131
- if (!of_property_read_bool (np , "ti,syscon-mmuconfig" )) {
1132
- dev_err (& pdev -> dev , "ti,syscon-mmuconfig property is missing\n" );
1133
- return - EINVAL ;
1134
- }
1135
-
1136
- obj -> syscfg =
1137
- syscon_regmap_lookup_by_phandle (np , "ti,syscon-mmuconfig" );
1138
- if (IS_ERR (obj -> syscfg )) {
1139
- /* can fail with -EPROBE_DEFER */
1140
- ret = PTR_ERR (obj -> syscfg );
1141
- return ret ;
1142
- }
1143
-
1144
- if (of_property_read_u32_index (np , "ti,syscon-mmuconfig" , 1 ,
1145
- & obj -> id )) {
1146
- dev_err (& pdev -> dev , "couldn't get the IOMMU instance id within subsystem\n" );
1147
- return - EINVAL ;
1148
- }
1130
+ obj -> syscfg = syscon_regmap_lookup_by_phandle_args (np , "ti,syscon-mmuconfig" ,
1131
+ 1 , & obj -> id );
1132
+ if (IS_ERR (obj -> syscfg ))
1133
+ return dev_err_probe (& pdev -> dev , PTR_ERR (obj -> syscfg ),
1134
+ "ti,syscon-mmuconfig property is missing\n" );
1149
1135
1150
1136
if (obj -> id != 0 && obj -> id != 1 ) {
1151
1137
dev_err (& pdev -> dev , "invalid IOMMU instance id\n" );
0 commit comments