@@ -152,9 +152,9 @@ void iommu_device_unregister(struct iommu_device *iommu)
152
152
}
153
153
EXPORT_SYMBOL_GPL (iommu_device_unregister );
154
154
155
- static struct iommu_param * iommu_get_dev_param (struct device * dev )
155
+ static struct dev_iommu * dev_iommu_get (struct device * dev )
156
156
{
157
- struct iommu_param * param = dev -> iommu_param ;
157
+ struct dev_iommu * param = dev -> iommu ;
158
158
159
159
if (param )
160
160
return param ;
@@ -164,14 +164,14 @@ static struct iommu_param *iommu_get_dev_param(struct device *dev)
164
164
return NULL ;
165
165
166
166
mutex_init (& param -> lock );
167
- dev -> iommu_param = param ;
167
+ dev -> iommu = param ;
168
168
return param ;
169
169
}
170
170
171
- static void iommu_free_dev_param (struct device * dev )
171
+ static void dev_iommu_free (struct device * dev )
172
172
{
173
- kfree (dev -> iommu_param );
174
- dev -> iommu_param = NULL ;
173
+ kfree (dev -> iommu );
174
+ dev -> iommu = NULL ;
175
175
}
176
176
177
177
int iommu_probe_device (struct device * dev )
@@ -183,7 +183,7 @@ int iommu_probe_device(struct device *dev)
183
183
if (!ops )
184
184
return - EINVAL ;
185
185
186
- if (!iommu_get_dev_param (dev ))
186
+ if (!dev_iommu_get (dev ))
187
187
return - ENOMEM ;
188
188
189
189
if (!try_module_get (ops -> owner )) {
@@ -200,7 +200,7 @@ int iommu_probe_device(struct device *dev)
200
200
err_module_put :
201
201
module_put (ops -> owner );
202
202
err_free_dev_param :
203
- iommu_free_dev_param (dev );
203
+ dev_iommu_free (dev );
204
204
return ret ;
205
205
}
206
206
@@ -211,9 +211,9 @@ void iommu_release_device(struct device *dev)
211
211
if (dev -> iommu_group )
212
212
ops -> remove_device (dev );
213
213
214
- if (dev -> iommu_param ) {
214
+ if (dev -> iommu ) {
215
215
module_put (ops -> owner );
216
- iommu_free_dev_param (dev );
216
+ dev_iommu_free (dev );
217
217
}
218
218
}
219
219
@@ -972,7 +972,7 @@ int iommu_register_device_fault_handler(struct device *dev,
972
972
iommu_dev_fault_handler_t handler ,
973
973
void * data )
974
974
{
975
- struct iommu_param * param = dev -> iommu_param ;
975
+ struct dev_iommu * param = dev -> iommu ;
976
976
int ret = 0 ;
977
977
978
978
if (!param )
@@ -1015,7 +1015,7 @@ EXPORT_SYMBOL_GPL(iommu_register_device_fault_handler);
1015
1015
*/
1016
1016
int iommu_unregister_device_fault_handler (struct device * dev )
1017
1017
{
1018
- struct iommu_param * param = dev -> iommu_param ;
1018
+ struct dev_iommu * param = dev -> iommu ;
1019
1019
int ret = 0 ;
1020
1020
1021
1021
if (!param )
@@ -1055,7 +1055,7 @@ EXPORT_SYMBOL_GPL(iommu_unregister_device_fault_handler);
1055
1055
*/
1056
1056
int iommu_report_device_fault (struct device * dev , struct iommu_fault_event * evt )
1057
1057
{
1058
- struct iommu_param * param = dev -> iommu_param ;
1058
+ struct dev_iommu * param = dev -> iommu ;
1059
1059
struct iommu_fault_event * evt_pending = NULL ;
1060
1060
struct iommu_fault_param * fparam ;
1061
1061
int ret = 0 ;
@@ -1104,7 +1104,7 @@ int iommu_page_response(struct device *dev,
1104
1104
int ret = - EINVAL ;
1105
1105
struct iommu_fault_event * evt ;
1106
1106
struct iommu_fault_page_request * prm ;
1107
- struct iommu_param * param = dev -> iommu_param ;
1107
+ struct dev_iommu * param = dev -> iommu ;
1108
1108
struct iommu_domain * domain = iommu_get_domain_for_dev (dev );
1109
1109
1110
1110
if (!domain || !domain -> ops -> page_response )
0 commit comments