From patchwork Sat Aug 20 16:01:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PrasannaKumar Muralidharan X-Patchwork-Id: 9291749 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 08568600CB for ; Sat, 20 Aug 2016 16:04:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFDA728AC5 for ; Sat, 20 Aug 2016 16:04:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E35B028AD8; Sat, 20 Aug 2016 16:04:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88EED28AC5 for ; Sat, 20 Aug 2016 16:04:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753937AbcHTQEG (ORCPT ); Sat, 20 Aug 2016 12:04:06 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:33961 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753142AbcHTQEF (ORCPT ); Sat, 20 Aug 2016 12:04:05 -0400 Received: by mail-pa0-f68.google.com with SMTP id hh10so5142197pac.1; Sat, 20 Aug 2016 09:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=s8ewa4MASnD7vy/Ni3yts3OU8k+V9tW48jxeDNhej0s=; b=BCezQtdWXntgtruymlfvHWj+N7/FJ7OoKHQbT9ucIT6aqvSQYnUfeRa1faYC+iQmM4 a1uqWXkKtSHmQqoLyqVLrLYmjoxDk824noRL7AwfYmQV/heS8vac0iYLpuw5hMEvIHWm jxKSHokyaha/y5+Ly5GbNL2YnVYeizQCHm+iVNudg3UwG1yivIl7aTrmGdXU3EnAabxb wsfK0j5TNu6uhchUf06hux+JAb8fry4hOMGVN6ZhA+l6p5HTi5+rIWsCA8NmRd0GcMyw y2EMDqer/kjwUR7RXL6UxTjiC5ugQTL7zfTWwtYxRd4VP8XZw5s0bhj7Dk8toMFYbUow dmCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=s8ewa4MASnD7vy/Ni3yts3OU8k+V9tW48jxeDNhej0s=; b=mN+zvVgHYWf+EOCvZKLurzgte0c0kkEmP0JAstvjg1hC7DTDx0ViaPjenjfGBlicCE msYtseBRupgNmvv8iLgzuMQR8lBtzBJb0jZXNLYPXE8mZ4wbf1cxVELyP0tNq4B/zo2U 27yBA+Z9mmzhe7qsvVhWQlb5ONtRleORh9onv7mPoCssUlGysIXyzjo0k7dD6SqF/nZt 1wudsdaazpEGg44ooH0xZTZZHl+tCHFa0qoiQaVH5bDxl/Kuk8yNn25IgXhBWWEfdMdQ YIliTaRDL9vukHN400OPMGTJenO8ISi6S/ejOsFFtWiPCPxfO24I3LwQdLOC/Je5yyLU mPyQ== X-Gm-Message-State: AEkoouucXngCPjIQLn2Zwqj1B21n0EY10OiWIyXRGWbpQzpOlKq+h5lcsm4IYS0dmY7ZcA== X-Received: by 10.66.53.234 with SMTP id e10mr25237804pap.28.1471709044558; Sat, 20 Aug 2016 09:04:04 -0700 (PDT) Received: from localhost.localdomain ([1.23.8.59]) by smtp.gmail.com with ESMTPSA id cp11sm20006770pac.28.2016.08.20.09.04.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 20 Aug 2016 09:04:02 -0700 (PDT) From: PrasannaKumar Muralidharan To: linux-crypto@vger.kernel.org, aaro.koskinen@iki.fi, mpm@selenic.com, herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org Cc: PrasannaKumar Muralidharan Subject: [PATCH] hw_random: omap3-rom-rng.c: Remove obsoleted functions Date: Sat, 20 Aug 2016 21:31:06 +0530 Message-Id: <1471708866-1423-1-git-send-email-prasannatsmkumar@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove omap3_rom_rng_data_present method as it was returning 1 always. Use .read callback instead of .data_read callback. This avoids use of obsolete callbacks. This patch is not tested with hardware as I don't have access to it. Signed-off-by: PrasannaKumar Muralidharan --- drivers/char/hw_random/omap3-rom-rng.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c index 8da14f1..37a58d7 100644 --- a/drivers/char/hw_random/omap3-rom-rng.c +++ b/drivers/char/hw_random/omap3-rom-rng.c @@ -71,12 +71,7 @@ static int omap3_rom_rng_get_random(void *buf, unsigned int count) return 0; } -static int omap3_rom_rng_data_present(struct hwrng *rng, int wait) -{ - return 1; -} - -static int omap3_rom_rng_data_read(struct hwrng *rng, u32 *data) +static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w) { int r; @@ -88,8 +83,7 @@ static int omap3_rom_rng_data_read(struct hwrng *rng, u32 *data) static struct hwrng omap3_rom_rng_ops = { .name = "omap3-rom", - .data_present = omap3_rom_rng_data_present, - .data_read = omap3_rom_rng_data_read, + .read = omap3_rom_rng_read, }; static int omap3_rom_rng_probe(struct platform_device *pdev)