We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de8f2c0 commit d5aeba4Copy full SHA for d5aeba4
drivers/dma/sh/shdma-base.c
@@ -1042,9 +1042,7 @@ EXPORT_SYMBOL(shdma_cleanup);
1042
1043
static int __init shdma_enter(void)
1044
{
1045
- shdma_slave_used = kcalloc(DIV_ROUND_UP(slave_num, BITS_PER_LONG),
1046
- sizeof(long),
1047
- GFP_KERNEL);
+ shdma_slave_used = bitmap_zalloc(slave_num, GFP_KERNEL);
1048
if (!shdma_slave_used)
1049
return -ENOMEM;
1050
return 0;
@@ -1053,7 +1051,7 @@ module_init(shdma_enter);
1053
1051
1054
1052
static void __exit shdma_exit(void)
1055
1056
- kfree(shdma_slave_used);
+ bitmap_free(shdma_slave_used);
1057
}
1058
module_exit(shdma_exit);
1059
0 commit comments