Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5932088ybi; Wed, 31 Jul 2019 05:41:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3R9Z0oYHvlOtLSk2zfD9218QfVCw9DhBO1a0mzQjkF3BtUA5vurGpvixpYZSWd2taQ2ZD X-Received: by 2002:a17:90a:350c:: with SMTP id q12mr2852743pjb.46.1564576903951; Wed, 31 Jul 2019 05:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564576903; cv=none; d=google.com; s=arc-20160816; b=PdE3Rb6kkOSloGqAtUpCRohjg1FjwlkDTjfmsL+UwSNxTRIdtow9uX49GDTbxmR15C frJO0ZPskuFlJuizjfRYyrbjvVr8bqkxGSs/3TiVc2w08TLIzSvN6Fg7qbs4WxC2zLSX 802IlPu/gwQDpdpllSFeXijs1ANPHLGhVOtn4uuel5S/BMwfTcsQ09GqLWBBFa2Durhn CPyy1s9onY5jqo3ANfFFoI7kbj8fDtZzrhbAlLfUitgkBb1dCIX0ab06P14Fjdsstw55 +I6PUIJ9XnULfFmKk09xp/gofY9G7vD3swp1xyqhjI06NZdBwC78ObuUt61j81F0OTM2 boBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:ironport-sdr; bh=18wbEYJJFp0Uj6ncaGzKp777J1VOWDuL0aKY8vwEBfU=; b=XdZJcm1+h/gkeuX+vO8Dd2vswjcd/vqfV7e88T7G/zJlREnM/o8ewAMlEMXLIPsgZB Ik9taXKOjqgZCT6RRgQd0Gt5S/uvLCiz3zH0L/OZor05nO8ZGnBMZNbhoH8p57o0Y09X GueZQtg4KDAdCV63dIeLZeYl6z2XDCcaVDo34dgUKNfE4MqyHUBBpvmU4MithzjzLnjA FazPzbgngbMKR93ptHNvWKF3BhqKET1ccDFuPh5Ez8thJg5cSHlXYlT8Lu25fQh38sy0 WKJm3xM/Gn9aRhEISDhVrcCuZFeWOhBgcpZkfSssWbUBzzxljcPlV3FsSO5l2tnCH8Kf hvRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si34853150pgh.564.2019.07.31.05.41.30; Wed, 31 Jul 2019 05:41:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728746AbfGaMFR (ORCPT + 99 others); Wed, 31 Jul 2019 08:05:17 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:16607 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727370AbfGaMFR (ORCPT ); Wed, 31 Jul 2019 08:05:17 -0400 Received-SPF: Pass (esa5.microchip.iphmx.com: domain of Ludovic.Desroches@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa5.microchip.iphmx.com; envelope-from="Ludovic.Desroches@microchip.com"; x-sender="Ludovic.Desroches@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa5.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa5.microchip.iphmx.com; envelope-from="Ludovic.Desroches@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa5.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Ludovic.Desroches@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: 1AVScHoOHG8smU+2JLHkpw75Dn9uq+ogTvKf34gG8Ztu/JmJ6tfStGOMNoiBH1vz5OqSajEDa1 BzygZno+/BHj10OFyzIgjXcvsDwpGCfq5jw2rhep9Q/u7YrxEwDWZfkBeO9ZtEu0cWKqLnewIl OUE8OQW4p6ltTC2r8zF7GdLxg6qnZ4T3EwuBnt1+RZy6U14iwIam6KQ9bkQ0ymQvvM7KI10VZx yH6S+rRlUYYW6UQbKkT1dHsl3QBG0GpTYrhc3Yf3HTDVjayYIgGeDXcsIXFynfbYPLHhnk0pxg ntE= X-IronPort-AV: E=Sophos;i="5.64,330,1559545200"; d="scan'208";a="41849008" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 31 Jul 2019 05:05:16 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 31 Jul 2019 05:05:15 -0700 Received: from localhost (10.10.85.251) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Wed, 31 Jul 2019 05:05:14 -0700 Date: Wed, 31 Jul 2019 14:04:20 +0200 From: Ludovic Desroches To: Chuhong Yuan CC: Herbert Xu , "David S . Miller" , Nicolas Ferre , "Alexandre Belloni" , , , Subject: Re: [PATCH] crypto: atmel-sha204a: Use device-managed registration API Message-ID: <20190731120420.4lqguk22ua5r2tqo@M43218.corp.atmel.com> Mail-Followup-To: Chuhong Yuan , Herbert Xu , "David S . Miller" , Nicolas Ferre , Alexandre Belloni , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20190723071934.12528-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190723071934.12528-1-hslester96@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Jul 23, 2019 at 03:19:36PM +0800, Chuhong Yuan wrote: > > Use devm_hwrng_register to get rid of manual > unregistration. > > Signed-off-by: Chuhong Yuan Acked-by: Ludovic Desroches Thanks > --- > drivers/crypto/atmel-sha204a.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c > index ea0d2068ea4f..c96c14e7dab1 100644 > --- a/drivers/crypto/atmel-sha204a.c > +++ b/drivers/crypto/atmel-sha204a.c > @@ -109,7 +109,7 @@ static int atmel_sha204a_probe(struct i2c_client *client, > i2c_priv->hwrng.read = atmel_sha204a_rng_read; > i2c_priv->hwrng.quality = 1024; > > - ret = hwrng_register(&i2c_priv->hwrng); > + ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng); > if (ret) > dev_warn(&client->dev, "failed to register RNG (%d)\n", ret); > > @@ -127,7 +127,6 @@ static int atmel_sha204a_remove(struct i2c_client *client) > > if (i2c_priv->hwrng.priv) > kfree((void *)i2c_priv->hwrng.priv); > - hwrng_unregister(&i2c_priv->hwrng); > > return 0; > } > -- > 2.20.1 > >