Skip to content

Commit f9845eb

Browse files
committed
dmaengine: sdxi: device: Fold sdxi_device_exit() into sdxi_unregister()
sdxi_device_exit() doesn't add any value as a standalone function. Signed-off-by: Nathan Lynch <nathan.lynch@amd.com>
1 parent c02a3ae commit f9845eb

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

drivers/dma/sdxi/device.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -295,17 +295,6 @@ static int sdxi_device_init(struct sdxi_dev *sdxi)
295295
return 0;
296296
}
297297

298-
static void sdxi_device_exit(struct sdxi_dev *sdxi)
299-
{
300-
struct sdxi_cxt *cxt;
301-
unsigned long index;
302-
303-
xa_for_each(&sdxi->client_cxts, index, cxt)
304-
sdxi_cxt_exit(cxt);
305-
306-
sdxi_dev_stop(sdxi);
307-
}
308-
309298
int sdxi_register(struct device *dev, const struct sdxi_bus_ops *ops)
310299
{
311300
struct sdxi_dev *sdxi;
@@ -331,9 +320,14 @@ int sdxi_register(struct device *dev, const struct sdxi_bus_ops *ops)
331320
void sdxi_unregister(struct device *dev)
332321
{
333322
struct sdxi_dev *sdxi = dev_get_drvdata(dev);
323+
struct sdxi_cxt *cxt;
324+
unsigned long index;
334325

335-
sdxi_device_exit(sdxi);
326+
xa_for_each(&sdxi->client_cxts, index, cxt)
327+
sdxi_cxt_exit(cxt);
336328
xa_destroy(&sdxi->client_cxts);
329+
337330
ida_destroy(&sdxi->vectors);
338331

332+
sdxi_dev_stop(sdxi);
339333
}

0 commit comments

Comments
 (0)