# SPDX-License-Identifier: GPL-2.0-only
 config NFC_S3FWRN5
        tristate
-       select CRYPTO
-       select CRYPTO_HASH
+       select CRYPTO_LIB_SHA1
        help
          Core driver for Samsung S3FWRN5 NFC chip. Contains core utilities
          of chip. It's intended to be used by PHYs to avoid duplicating lots
 
 
 #include <linux/completion.h>
 #include <linux/firmware.h>
-#include <crypto/hash.h>
 #include <crypto/sha1.h>
 
 #include "s3fwrn5.h"
        struct device *dev = &fw_info->ndev->nfc_dev->dev;
        struct s3fwrn5_fw_image *fw = &fw_info->fw;
        u8 hash_data[SHA1_DIGEST_SIZE];
-       struct crypto_shash *tfm;
        u32 image_size, off;
        int ret;
 
        image_size = fw_info->sector_size * fw->image_sectors;
 
        /* Compute SHA of firmware data */
-
-       tfm = crypto_alloc_shash("sha1", 0, 0);
-       if (IS_ERR(tfm)) {
-               dev_err(dev, "Cannot allocate shash (code=%pe)\n", tfm);
-               return PTR_ERR(tfm);
-       }
-
-       ret = crypto_shash_tfm_digest(tfm, fw->image, image_size, hash_data);
-
-       crypto_free_shash(tfm);
-       if (ret) {
-               dev_err(dev, "Cannot compute hash (code=%d)\n", ret);
-               return ret;
-       }
+       sha1(fw->image, image_size, hash_data);
 
        /* Firmware update process */