Skip to contentSkip to conversation

crypto: s5p-sss: pass s5p_aes_dev to irq handler

PATCH In review Rosen Penev 4 participants 4 messages Aug 11 – Sep 4

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: s5p-sss: pass s5p_aes_dev to irq handler

The threaded irq handler takes the platform device and calls platform_get_drvdata() to recover the driver data. Pass the driver data directly as the devm_request_threaded_irq() argument instead, dropping the platform_get_drvdata() call.

Assisted-by opencode:deepseek-v4-flash-free
---
 drivers/crypto/s5p-sss.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/s5p-sss.c +2 -3
index bdda7b39af85..f20c02e9d646 100644
@@ -638,8 +638,7 @@ static int s5p_hash_rx(struct s5p_aes_dev *dev)
 
 static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
 {
-	struct platform_device *pdev = dev_id;
-	struct s5p_aes_dev *dev = platform_get_drvdata(pdev);
+	struct s5p_aes_dev *dev = dev_id;
 	struct skcipher_request *req;
 	int err_dma_tx = 0;
 	int err_dma_rx = 0;
@@ -2221,7 +2220,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
 	}
 	err = devm_request_threaded_irq(dev, pdata->irq_fc, NULL,
 					s5p_aes_interrupt, IRQF_ONESHOT,
-					pdev->name, pdev);
+					pdev->name, pdata);
 	if (err < 0) {
 		dev_warn(dev, "feed control interrupt is not available.\n");
 		goto err_irq;
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 26 lines · Rosen Penev

The threaded irq handler takes the platform device and calls platform_get_drvdata() to recover the driver data. Pass the driver data directly as the devm_request_threaded_irq() argument instead, dropping the platform_get_drvdata() call.

Assisted-by opencode:deepseek-v4-flash-free
---
  drivers/crypto/s5p-sss.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/s5p-sss.c +1 -2
index bdda7b39af85..f20c02e9d646 100644
@@ -638,8 +638,7 @@ static int s5p_hash_rx(struct s5p_aes_dev *dev)
 
  static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
  {
-	struct platform_device *pdev = dev_id;
-	struct s5p_aes_dev *dev = platform_get_drvdata(pdev);
+	struct s5p_aes_dev *dev = dev_id;
  	struct skcipher_request *req;
  	int err_dma_tx = 0;
  	int err_dma_rx = 0;

drivers/crypto/s5p-sss.c static int s5p_aes_probe(struct platform_device *pdev) · line 2226

Quoted 8 lines
drivers/crypto/s5p-sss.c +1 -1
@@ -2221,7 +2220,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
  	}
  	err = devm_request_threaded_irq(dev, pdata->irq_fc, NULL,
  					s5p_aes_interrupt, IRQF_ONESHOT,
-					pdev->name, pdev);
+					pdev->name, pdata);
  	if (err < 0) {
  		dev_warn(dev, "feed control interrupt is not available.\n");
  		goto err_irq;
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Rosen Penev
Quoted 26 lines · Rosen Penev

The threaded irq handler takes the platform device and calls platform_get_drvdata() to recover the driver data. Pass the driver data directly as the devm_request_threaded_irq() argument instead, dropping the platform_get_drvdata() call.

Assisted-by opencode:deepseek-v4-flash-free
---
  drivers/crypto/s5p-sss.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
drivers/crypto/s5p-sss.c +1 -2
index bdda7b39af85..f20c02e9d646 100644
@@ -638,8 +638,7 @@ static int s5p_hash_rx(struct s5p_aes_dev *dev)
 
  static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
  {
-	struct platform_device *pdev = dev_id;
-	struct s5p_aes_dev *dev = platform_get_drvdata(pdev);
+	struct s5p_aes_dev *dev = dev_id;
  	struct skcipher_request *req;
  	int err_dma_tx = 0;
  	int err_dma_rx = 0;

drivers/crypto/s5p-sss.c static int s5p_aes_probe(struct platform_device *pdev) · line 2226

Quoted 8 lines
drivers/crypto/s5p-sss.c +1 -1
@@ -2221,7 +2220,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
  	}
  	err = devm_request_threaded_irq(dev, pdata->irq_fc, NULL,
  					s5p_aes_interrupt, IRQF_ONESHOT,
-					pdev->name, pdev);
+					pdev->name, pdata);
  	if (err < 0) {
  		dev_warn(dev, "feed control interrupt is not available.\n");
  		goto err_irq;
Signature · 2 lines
Best wishes,
Vladimir
maintainer
#3 lore raw
In reply to Rosen Penev
Quoted 10 lines · Rosen Penev

The threaded irq handler takes the platform device and calls platform_get_drvdata() to recover the driver data. Pass the driver data directly as the devm_request_threaded_irq() argument instead, dropping the platform_get_drvdata() call.

Assisted-by opencode:deepseek-v4-flash-free
---
 drivers/crypto/s5p-sss.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt