From patchwork Fri Jun 7 15:57:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10982313 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 A043F924 for ; Fri, 7 Jun 2019 15:57:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FE7728B9B for ; Fri, 7 Jun 2019 15:57:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8425528BA9; Fri, 7 Jun 2019 15:57:59 +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 3022828BA0 for ; Fri, 7 Jun 2019 15:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730763AbfFGP56 (ORCPT ); Fri, 7 Jun 2019 11:57:58 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:33424 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729367AbfFGP55 (ORCPT ); Fri, 7 Jun 2019 11:57:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1559923075; 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=LEAcNQEFSV4vEi4RU29MUMcA9Jz9XuPJ9DAENOw2h5s=; b=WiVfnV1X9xbWRAHKa8gRqq1hhkt2xZvf4pKWyy8C7np+GyxuaQZYV+0f1xBoHVyVQnueNJ Yu/+OPO7ZX9yIgoUOsgDOsvfL4l/uQML13BjKur+aUIN5qJCryZUyr2q7ZzOJFq/Hy/GZa 7X+lxYJivVTeFOohhUHKvT+CFlQpHyQ= From: Paul Cercueil To: Bin Liu Cc: od@zcrc.me, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH] usb: musb: jz4740: Make probe function __init_or_module Date: Fri, 7 Jun 2019 17:57:51 +0200 Message-Id: <20190607155751.15778-1-paul@crapouillou.net> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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/usb/musb/jz4740.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c index 5261f8dfedec..c881f6d14752 100644 --- a/drivers/usb/musb/jz4740.c +++ b/drivers/usb/musb/jz4740.c @@ -105,7 +105,7 @@ static const struct musb_platform_ops jz4740_musb_ops = { .init = jz4740_musb_init, }; -static int jz4740_probe(struct platform_device *pdev) +static int __init_or_module jz4740_probe(struct platform_device *pdev) { struct musb_hdrc_platform_data *pdata = &jz4740_musb_platform_data; struct platform_device *musb; @@ -174,7 +174,7 @@ static int jz4740_probe(struct platform_device *pdev) return ret; } -static int jz4740_remove(struct platform_device *pdev) +static int __exit jz4740_remove(struct platform_device *pdev) { struct jz4740_glue *glue = platform_get_drvdata(pdev);