Commit 972b0d45 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: Intel: remove GFP_ATOMIC, use GFP_KERNEL

GFP_ATOMIC is not required on any Intel drivers, use GFP_KERNEL
instead. A first cleanup was merged in April but missed a number
occurrences and new ones were added by copy/paste inertia.

While we are at it, make checkpatch happy with a sizeof(*msg)
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 48bf41a2
...@@ -166,11 +166,11 @@ int sst_create_ipc_msg(struct ipc_post **arg, bool large) ...@@ -166,11 +166,11 @@ int sst_create_ipc_msg(struct ipc_post **arg, bool large)
{ {
struct ipc_post *msg; struct ipc_post *msg;
msg = kzalloc(sizeof(struct ipc_post), GFP_ATOMIC); msg = kzalloc(sizeof(*msg), GFP_KERNEL);
if (!msg) if (!msg)
return -ENOMEM; return -ENOMEM;
if (large) { if (large) {
msg->mailbox_data = kzalloc(SST_MAILBOX_SIZE, GFP_ATOMIC); msg->mailbox_data = kzalloc(SST_MAILBOX_SIZE, GFP_KERNEL);
if (!msg->mailbox_data) { if (!msg->mailbox_data) {
kfree(msg); kfree(msg);
return -ENOMEM; return -ENOMEM;
......
...@@ -403,7 +403,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) ...@@ -403,7 +403,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
const char *i2c_name; const char *i2c_name;
int i; int i;
drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_ATOMIC); drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
if (!drv) if (!drv)
return -ENOMEM; return -ENOMEM;
......
...@@ -603,7 +603,7 @@ static int geminilake_audio_probe(struct platform_device *pdev) ...@@ -603,7 +603,7 @@ static int geminilake_audio_probe(struct platform_device *pdev)
{ {
struct glk_card_private *ctx; struct glk_card_private *ctx;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC); ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx) if (!ctx)
return -ENOMEM; return -ENOMEM;
......
...@@ -935,7 +935,7 @@ static int kabylake_audio_probe(struct platform_device *pdev) ...@@ -935,7 +935,7 @@ static int kabylake_audio_probe(struct platform_device *pdev)
{ {
struct kbl_codec_private *ctx; struct kbl_codec_private *ctx;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC); ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx) if (!ctx)
return -ENOMEM; return -ENOMEM;
......
...@@ -140,7 +140,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev) ...@@ -140,7 +140,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
dev_dbg(&pdev->dev, "%s: entry\n", __func__); dev_dbg(&pdev->dev, "%s: entry\n", __func__);
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC); ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx) if (!ctx)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment