From patchwork Fri Jun 7 16:05:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10982317 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9F0B6C5 for ; Fri, 7 Jun 2019 16:05:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B91DC204BA for ; Fri, 7 Jun 2019 16:05:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACDDA288B3; Fri, 7 Jun 2019 16:05:10 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 4A004204BA for ; Fri, 7 Jun 2019 16:05:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729620AbfFGQFJ (ORCPT ); Fri, 7 Jun 2019 12:05:09 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:40382 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729606AbfFGQFJ (ORCPT ); Fri, 7 Jun 2019 12:05:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1559923508; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=hNMNkjEA3+4rNF+yp5nWqqoJfF6+ddjC2q7b5Wtp9Vo=; b=UDg/xRtWKDpep/pPM+s7gBNeP1FLR4eKwaUveYyy0cPx688uODdZ+9JeBTZP8cjJ3A8weK ZScRPGwxuoWkuZ2hNwzGj/K1Ot7ezBKiHyhpmZh2at/IZe9JCM2F6AX781iV7+i/lEnOkm h3sjWnPoneAoss7qB8zXKqoVNB7UjN0= From: Paul Cercueil To: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler Cc: Artur Rojek , od@zcrc.me, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH] iio: ingenic-adc: Make probe function __init_or_module Date: Fri, 7 Jun 2019 18:05:01 +0200 Message-Id: <20190607160501.16369-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/iio/adc/ingenic-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ingenic-adc.c b/drivers/iio/adc/ingenic-adc.c index 92b1d5037ac9..027f710df843 100644 --- a/drivers/iio/adc/ingenic-adc.c +++ b/drivers/iio/adc/ingenic-adc.c @@ -279,7 +279,7 @@ static const struct iio_chan_spec ingenic_channels[] = { }, }; -static int ingenic_adc_probe(struct platform_device *pdev) +static int __init_or_module ingenic_adc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct iio_dev *iio_dev;