Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp522058ybi; Fri, 7 Jun 2019 11:58:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqy844VHgxsUdMK5cxik2txXqeXV8ofTjJLsHGWaWGckP+I+/ez2JcLN7Z+Irqqwq+8XbwlM X-Received: by 2002:a17:902:868a:: with SMTP id g10mr57295316plo.205.1559933930726; Fri, 07 Jun 2019 11:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559933930; cv=none; d=google.com; s=arc-20160816; b=BF8rSH/Si0SCQniZgQLz1SUljyou3IaGvJcOHS7N7+VyBy6gQ7slrwTZFjEEGKgqL1 kpvqGR1K6h7jXHjzZuw3gZAifc2BC5/Ai9uEM4kcHuX4MU5587w/VOWJPpEnCO05DToi MoxyiitPMhV7QhfZplw7rQuTbCBIG60xnIoPlKXm03Z+25v53mMDSH418qnKh+GEttm8 CkDgoat1jSvWM1iz0O52R85V/O2GaPCjFsl+EV/0z/lrZz9+rm6B/0ezg2GLRt8nL10M 6/eWBzl1A8tMoxsnu9yI7u0xdvgRnPgjAmRdiZSRa7igELDKtGRKMm8phU5TmwIrNqXD ehVA== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=e/I0EA9bRZBZp0sLteEkqD4J5yGXS38cP8BPrE0GoWE=; b=Wx3vFX/dCYwZXsS2Gf2UdGQQa93jks2xXNdgBmneplKGpklTey9rmSIlul88oc1xFk 8pjFjZbxlHaTJsumfRWM3xHIzEhMGHxHA5cyej88NMPE8M1TaY/jUk1rB24ECyfxVO6p 0phT7Ki9QyvZ42GoUDDx55OL1HaxYrotUC1TDbkkHkdw185yvycVBoDXNB7ot9SEMkRz qk4A8NdFE28IywFNgzqe7HkJiqFrbcZpOpt/G/ocv9aYcxkBVzfLIxE1jAmbESTvP9kV HB+frIP9ANHIq62ZATg5jhw+irSNIcQKc+H84WYyqminOQZjoQc/ECHWRZY3edVIVmKn KTUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=GpxDO1vr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si2615038plq.276.2019.06.07.11.58.34; Fri, 07 Jun 2019 11:58:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=GpxDO1vr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731427AbfFGR3w (ORCPT + 99 others); Fri, 7 Jun 2019 13:29:52 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40626 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729550AbfFGR3w (ORCPT ); Fri, 7 Jun 2019 13:29:52 -0400 Received: by mail-pl1-f193.google.com with SMTP id a93so1080098pla.7; Fri, 07 Jun 2019 10:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=e/I0EA9bRZBZp0sLteEkqD4J5yGXS38cP8BPrE0GoWE=; b=GpxDO1vrwlcOpY6Za2KUWxwRYJ/3Vbk/f9XacCoEw1qEyNIrUOa06P/rQzUFjHa1ZU xF4H4t+TgAbAWtNQTBgq72kNr65rP8gGF7p57jddF63N/xj+LiIpObwnOh1UoYFz69Wk j3wgZkRsx4jii1Me1XJiZsWkizOqlQ7jEXK2iyK64Ii2OVlLdBw4Nma0Hl8KHFFOW5dR fX3z6qQYKUOE3M2aZlmg527SSVYl3vyXbnnyBx6b1lZvxzC+Vr/BWqTsgc2lKoOqZsMY m57ebXIHXQGptVchb9XglmxbZ6NFXUnmT7BBCToT64QlvHvnaBD7kUV9a6g+9H71GxhG e5/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=e/I0EA9bRZBZp0sLteEkqD4J5yGXS38cP8BPrE0GoWE=; b=tWgGa3lfCm3X1pWAK9Jc7RftM1m/QM2CyHsjW+wYFnBSZJzmK9TyfgijLWi6+iqSVj Nd8CW+UpvIKbeeoywHPcaIHqmOopk1u+/iCR8kL220v/owXFl9j+Iksx7TbPWIgoFj9M sjmwlqjo/l9lVPoAUqRQYXpC9oBtpxbOJMXTc7PTsoM27KWUErzPIv7S3XTXhCe9jtyq 0UrECHz7YEeMHuMXpE1YXVEqftGaG6E2/cPEgY3i0BYeAAAulk+PfAvzzJBJCAb5pc3T JMTipvrTxmIZnpdpoisLQ93VMjMxj9PTMAaI4EsJ9rKKpGyG8dc784NnS9mCScHqgzsl +4Zw== X-Gm-Message-State: APjAAAXX/NA4Xg/EHrmCJffoJwvRTivUH6/ZFJFIE1nC1Zoe3uPVSGGK 3xo9pLrRs20H688uv8EHZrs= X-Received: by 2002:a17:902:2a26:: with SMTP id i35mr18666993plb.315.1559928591167; Fri, 07 Jun 2019 10:29:51 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id j4sm681810pfi.136.2019.06.07.10.29.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Jun 2019 10:29:50 -0700 (PDT) Date: Fri, 7 Jun 2019 10:29:49 -0700 From: Guenter Roeck To: Paul Cercueil Cc: Wim Van Sebroeck , od@zcrc.me, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] watchdog: jz4740: Make probe function __init_or_module Message-ID: <20190607172949.GA14550@roeck-us.net> References: <20190607162429.17915-1-paul@crapouillou.net> <20190607162429.17915-5-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190607162429.17915-5-paul@crapouillou.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 07, 2019 at 06:24:29PM +0200, Paul Cercueil wrote: > This allows the probe function to be dropped after the kernel finished > its initialization, in the case where the driver was not compiled as a > module. > > Signed-off-by: Paul Cercueil Reviewed-by: Guenter Roeck > --- > > Notes: > v2: New patch > > drivers/watchdog/jz4740_wdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/watchdog/jz4740_wdt.c b/drivers/watchdog/jz4740_wdt.c > index 7519d80c5d05..2061788c1939 100644 > --- a/drivers/watchdog/jz4740_wdt.c > +++ b/drivers/watchdog/jz4740_wdt.c > @@ -157,7 +157,7 @@ static const struct of_device_id jz4740_wdt_of_matches[] = { > MODULE_DEVICE_TABLE(of, jz4740_wdt_of_matches); > #endif > > -static int jz4740_wdt_probe(struct platform_device *pdev) > +static int __init_or_module jz4740_wdt_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > struct jz4740_wdt_drvdata *drvdata;