From patchwork Mon Mar 9 17:36:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 5970371 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 09BB39F318 for ; Mon, 9 Mar 2015 17:38:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4AF9A201CD for ; Mon, 9 Mar 2015 17:38:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 65E7B201B4 for ; Mon, 9 Mar 2015 17:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582AbbCIRhu (ORCPT ); Mon, 9 Mar 2015 13:37:50 -0400 Received: from mail-ie0-f172.google.com ([209.85.223.172]:46979 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753663AbbCIRg6 (ORCPT ); Mon, 9 Mar 2015 13:36:58 -0400 Received: by iecrd18 with SMTP id rd18so14536948iec.13; Mon, 09 Mar 2015 10:36:57 -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:in-reply-to:references; bh=0A+09pffnOpxxfD66SxQzQ3FbE8n/YyHKvzh+eF6mKU=; b=Ni55cAyVjcDMRh2zg0l1Gq94Dbt9KlZbxrUz3OrIOBNEY/ikdI5XswA4YmcVP45Of3 A2yRA4GwNHHeSwVaKZWaZE77qVvhRPr764/y1KeZy0aFkX+4TiwUhLo+M2TNJtlpgBKl CjFvvN/zSpuZUZs59+ZahpzXzZqgDVJsB0hsik7ERPEALIGwLAEwVJ9bdngtyQ9HrXLW PkvFBsVlh8o57RvDG6/N0rKBwvPIAGcAmRLh0qvBJvekPL+b4T5bFaxXHXaXZRPDhi/V 4R+HKPi3tKCnKoG8+AXEE6xwDyjuQEQ81MwT7Vxb1izpMMuVv6PE23+a7XXHj3fXgVY2 jnPg== X-Received: by 10.107.167.3 with SMTP id q3mr49299270ioe.18.1425922617667; Mon, 09 Mar 2015 10:36:57 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([172.22.64.149]) by mx.google.com with ESMTPSA id f142sm12517893ioe.3.2015.03.09.10.36.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Mar 2015 10:36:56 -0700 (PDT) From: Dmitry Torokhov To: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Herbert Xu Subject: [PATCH 4/4] hwrng: pseries-rng - remove incorrect __init/__exit markups Date: Mon, 9 Mar 2015 10:36:38 -0700 Message-Id: <1425922598-16538-4-git-send-email-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1425922598-16538-1-git-send-email-dmitry.torokhov@gmail.com> References: <1425922598-16538-1-git-send-email-dmitry.torokhov@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Even if bus is not hot-pluggable, the devices can be unbound from the driver via sysfs, so we should not be using __exit annotations on remove() methods. The only exception is drivers registered with platform_driver_probe() which specifically disables sysfs bind/unbind attributes. Similarly probe() methods should not be marked __init unless platform_driver_probe() is used. Signed-off-by: Dmitry Torokhov --- drivers/char/hw_random/pseries-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/hw_random/pseries-rng.c b/drivers/char/hw_random/pseries-rng.c index bcf86f9..63ce51d 100644 --- a/drivers/char/hw_random/pseries-rng.c +++ b/drivers/char/hw_random/pseries-rng.c @@ -61,13 +61,13 @@ static struct hwrng pseries_rng = { .read = pseries_rng_read, }; -static int __init pseries_rng_probe(struct vio_dev *dev, +static int pseries_rng_probe(struct vio_dev *dev, const struct vio_device_id *id) { return hwrng_register(&pseries_rng); } -static int __exit pseries_rng_remove(struct vio_dev *dev) +static int pseries_rng_remove(struct vio_dev *dev) { hwrng_unregister(&pseries_rng); return 0;