crypto: atmel-{aes,sha,tdes} - Retire crypto_platform_data
These drivers no longer need it as they are only probed via DT. crypto_platform_data was allocated but unused, so remove it. This is a follow up for: commit45a536e3a7
("crypto: atmel-tdes - Retire dma_request_slave_channel_compat()") commitdb28512f48
("crypto: atmel-sha - Retire dma_request_slave_channel_compat()") commit62f72cbdcf
("crypto: atmel-aes - Retire dma_request_slave_channel_compat()") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:

committed by
Herbert Xu

parent
41419a2890
commit
b46f36c05a
@@ -21,6 +21,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <linux/device.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -37,7 +38,6 @@
|
||||
#include <crypto/xts.h>
|
||||
#include <crypto/internal/aead.h>
|
||||
#include <crypto/internal/skcipher.h>
|
||||
#include <linux/platform_data/crypto-atmel.h>
|
||||
#include "atmel-aes-regs.h"
|
||||
#include "atmel-authenc.h"
|
||||
|
||||
@@ -2479,45 +2479,15 @@ static const struct of_device_id atmel_aes_dt_ids[] = {
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, atmel_aes_dt_ids);
|
||||
|
||||
static struct crypto_platform_data *atmel_aes_of_init(struct platform_device *pdev)
|
||||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct crypto_platform_data *pdata;
|
||||
|
||||
if (!np) {
|
||||
dev_err(&pdev->dev, "device node not found\n");
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
|
||||
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
|
||||
if (!pdata)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
return pdata;
|
||||
}
|
||||
#else
|
||||
static inline struct crypto_platform_data *atmel_aes_of_init(struct platform_device *pdev)
|
||||
{
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int atmel_aes_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct atmel_aes_dev *aes_dd;
|
||||
struct crypto_platform_data *pdata;
|
||||
struct device *dev = &pdev->dev;
|
||||
struct resource *aes_res;
|
||||
int err;
|
||||
|
||||
pdata = pdev->dev.platform_data;
|
||||
if (!pdata) {
|
||||
pdata = atmel_aes_of_init(pdev);
|
||||
if (IS_ERR(pdata))
|
||||
return PTR_ERR(pdata);
|
||||
}
|
||||
|
||||
aes_dd = devm_kzalloc(&pdev->dev, sizeof(*aes_dd), GFP_KERNEL);
|
||||
if (!aes_dd)
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user