File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ int acpi_dma_controller_free(struct device *dev)
236
236
}
237
237
EXPORT_SYMBOL_GPL (acpi_dma_controller_free );
238
238
239
- static void devm_acpi_dma_release ( struct device * dev , void * res )
239
+ static void devm_acpi_dma_free ( void * dev )
240
240
{
241
241
acpi_dma_controller_free (dev );
242
242
}
@@ -259,20 +259,13 @@ int devm_acpi_dma_controller_register(struct device *dev,
259
259
(struct acpi_dma_spec * , struct acpi_dma * ),
260
260
void * data )
261
261
{
262
- void * res ;
263
262
int ret ;
264
263
265
- res = devres_alloc (devm_acpi_dma_release , 0 , GFP_KERNEL );
266
- if (!res )
267
- return - ENOMEM ;
268
-
269
264
ret = acpi_dma_controller_register (dev , acpi_dma_xlate , data );
270
- if (ret ) {
271
- devres_free (res );
265
+ if (ret )
272
266
return ret ;
273
- }
274
- devres_add (dev , res );
275
- return 0 ;
267
+
268
+ return devm_add_action_or_reset (dev , devm_acpi_dma_free , dev );
276
269
}
277
270
EXPORT_SYMBOL_GPL (devm_acpi_dma_controller_register );
278
271
You can’t perform that action at this time.
0 commit comments