diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-10-30 06:54:34 -0400 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-20 09:58:56 -0500 |
commit | 18b2a02c7c8db8bb87a165d26c269968d3dd47bd (patch) | |
tree | 325529f85afe764276c4f728e6fc4179864646aa /drivers/dma/mv_xor.c | |
parent | c08f1495c886f70f99af7fdcbabe612b31b97d4a (diff) |
dma: mv_xor: remove sub-driver 'mv_xor'
Now that XOR channels are directly registered by the main
'mv_xor_shared' device ->probe() function and all users of the
'mv_xor' device have been removed, we can get rid of the latter.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'drivers/dma/mv_xor.c')
-rw-r--r-- | drivers/dma/mv_xor.c | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 6ed3162cccc9..be3907bdef14 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -1219,35 +1219,6 @@ mv_xor_channel_add(struct mv_xor_shared_private *msp, | |||
1219 | return ERR_PTR(ret); | 1219 | return ERR_PTR(ret); |
1220 | } | 1220 | } |
1221 | 1221 | ||
1222 | static int __devexit mv_xor_remove(struct platform_device *pdev) | ||
1223 | { | ||
1224 | struct mv_xor_device *device = platform_get_drvdata(pdev); | ||
1225 | return mv_xor_channel_remove(device); | ||
1226 | } | ||
1227 | |||
1228 | static int __devinit mv_xor_probe(struct platform_device *pdev) | ||
1229 | { | ||
1230 | struct mv_xor_platform_data *plat_data = pdev->dev.platform_data; | ||
1231 | struct mv_xor_shared_private *msp = | ||
1232 | platform_get_drvdata(plat_data->shared); | ||
1233 | struct mv_xor_device *mv_xor_device; | ||
1234 | int irq; | ||
1235 | |||
1236 | irq = platform_get_irq(pdev, 0); | ||
1237 | if (irq < 0) | ||
1238 | return irq; | ||
1239 | |||
1240 | mv_xor_device = mv_xor_channel_add(msp, pdev, plat_data->hw_id, | ||
1241 | plat_data->cap_mask, | ||
1242 | plat_data->pool_size, irq); | ||
1243 | if (IS_ERR(mv_xor_device)) | ||
1244 | return PTR_ERR(mv_xor_device); | ||
1245 | |||
1246 | platform_set_drvdata(pdev, mv_xor_device); | ||
1247 | |||
1248 | return 0; | ||
1249 | } | ||
1250 | |||
1251 | static void | 1222 | static void |
1252 | mv_xor_conf_mbus_windows(struct mv_xor_shared_private *msp, | 1223 | mv_xor_conf_mbus_windows(struct mv_xor_shared_private *msp, |
1253 | const struct mbus_dram_target_info *dram) | 1224 | const struct mbus_dram_target_info *dram) |
@@ -1279,15 +1250,6 @@ mv_xor_conf_mbus_windows(struct mv_xor_shared_private *msp, | |||
1279 | writel(win_enable, base + WINDOW_BAR_ENABLE(1)); | 1250 | writel(win_enable, base + WINDOW_BAR_ENABLE(1)); |
1280 | } | 1251 | } |
1281 | 1252 | ||
1282 | static struct platform_driver mv_xor_driver = { | ||
1283 | .probe = mv_xor_probe, | ||
1284 | .remove = __devexit_p(mv_xor_remove), | ||
1285 | .driver = { | ||
1286 | .owner = THIS_MODULE, | ||
1287 | .name = MV_XOR_NAME, | ||
1288 | }, | ||
1289 | }; | ||
1290 | |||
1291 | static int mv_xor_shared_probe(struct platform_device *pdev) | 1253 | static int mv_xor_shared_probe(struct platform_device *pdev) |
1292 | { | 1254 | { |
1293 | const struct mbus_dram_target_info *dram; | 1255 | const struct mbus_dram_target_info *dram; |
@@ -1406,15 +1368,7 @@ static struct platform_driver mv_xor_shared_driver = { | |||
1406 | 1368 | ||
1407 | static int __init mv_xor_init(void) | 1369 | static int __init mv_xor_init(void) |
1408 | { | 1370 | { |
1409 | int rc; | 1371 | return platform_driver_register(&mv_xor_shared_driver); |
1410 | |||
1411 | rc = platform_driver_register(&mv_xor_shared_driver); | ||
1412 | if (!rc) { | ||
1413 | rc = platform_driver_register(&mv_xor_driver); | ||
1414 | if (rc) | ||
1415 | platform_driver_unregister(&mv_xor_shared_driver); | ||
1416 | } | ||
1417 | return rc; | ||
1418 | } | 1372 | } |
1419 | module_init(mv_xor_init); | 1373 | module_init(mv_xor_init); |
1420 | 1374 | ||
@@ -1422,7 +1376,6 @@ module_init(mv_xor_init); | |||
1422 | #if 0 | 1376 | #if 0 |
1423 | static void __exit mv_xor_exit(void) | 1377 | static void __exit mv_xor_exit(void) |
1424 | { | 1378 | { |
1425 | platform_driver_unregister(&mv_xor_driver); | ||
1426 | platform_driver_unregister(&mv_xor_shared_driver); | 1379 | platform_driver_unregister(&mv_xor_shared_driver); |
1427 | return; | 1380 | return; |
1428 | } | 1381 | } |