From patchwork Thu Jul 25 07:56:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 169682 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp11292669ilk; Thu, 25 Jul 2019 00:56:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqw52MYSgAxxFfTe4AVijdt6biRfgnyzBggKiu+VkR7XwKuBNsaLSTkxOJVkJRHQ6avKIuLC X-Received: by 2002:a63:7245:: with SMTP id c5mr71405482pgn.11.1564041397452; Thu, 25 Jul 2019 00:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564041397; cv=none; d=google.com; s=arc-20160816; b=D5pY0NlLM/mfvTHKt8HnycaETkyeXyeWB0/q5NnJhK341eOKtKIsTZgLVUTsPJsumJ W6hiTqVH0LeleOEuN88Up2CcBn+LWUV2DUoPIKjoD0KFb7XqwfeLqGRE9AURg4nFQfb2 zdtMEkxZl5T5iU6k/+DYuH6arVAPdbhAWUxXcpDP4pyaJ/3h0U8MX4SB0XiHX3APz33g 0kFDgBt0mBChX0OZXVT+xv4J1KDU7xDB9DP+nqP1EKUHikVBw3+bJ73PyrY8mg/g5fO5 T8TltyK+MEEgh8TepVtdtKOXcd2DY2O+SBWEP2uVNzvyDRxGBoDXDCFE8XjwEsTzmaYP WtTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=oPhMC5eLv3LSVkBhX5uqN94UAFd9buQ6xbizcntcIj4=; b=UZQW1cvqGdBS6BXorrI5Qf7F/2XBg1t25VQ9sRo2XOVoX2lO3Cq6Qgo3XjGKsX4dg9 6/TX8e/Sc0bFsugXXNYVZDMmBeLjkGTPDE6lF8UcL0Jsg8xhx0lQe5sL5IejObLICrid tcyyWQg5GGS4MZo6u1Vl4fMbvzPz+aWdPYS4Au5EN83NFgBiU0dKGnXSvgyspDMIKT/G Z17CVOxjT71wizbsqDYtVY7gjaNMEZqm/tCyD4C/zSP3ZkqC3nryVT7v0E//1Lu29ogZ yGka/JAfqUHTx8gtIJbhzBtvajeDNQEsWfogg4TZ9U9xEH1irtg5KasqDgepYSLkZMJm 6S3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gU9RlzjK; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si32636580pgp.288.2019.07.25.00.56.37; Thu, 25 Jul 2019 00:56:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gU9RlzjK; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388670AbfGYH4g (ORCPT + 2 others); Thu, 25 Jul 2019 03:56:36 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:42997 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388667AbfGYH4g (ORCPT ); Thu, 25 Jul 2019 03:56:36 -0400 Received: by mail-pg1-f194.google.com with SMTP id t132so22598256pgb.9 for ; Thu, 25 Jul 2019 00:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=oPhMC5eLv3LSVkBhX5uqN94UAFd9buQ6xbizcntcIj4=; b=gU9RlzjKhjVYpSzfgbQtfgo4FUEPEtq8PTlxfAMmALiP6j7lO9a1JjhQ2/waNbbRh3 q1cqem1MSNir9sfiSTZdURrn+1MBTgX6N4mdEU735+P37HKkR8LNRkiZJwGBuWz5FRKZ B5s70u0vk96SBR0+TgZteULP5GWzfT2/PH+NWm6TtTo3TnQ/gkOCPKbAJ3ColBXyB9BU vMxReKCWpwvNFYUeXmW497IB11fJ9hMBG6xvQtlFqFpQM5K6IQ8dPQuYSMEQsu15qQkZ r6HatIt/DN5NQcHMp1ItDn0gArYHDJ3e17HrL6b+3ta7UqGm9RXU01l81wiUHMDV1jNJ 24Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oPhMC5eLv3LSVkBhX5uqN94UAFd9buQ6xbizcntcIj4=; b=KHv6EpFX7gKFzA938G4Zs2qLySZmIwXFC6ljOHy1RUesZgIJwbgZ9MlrbF65SzD/P0 8IDHVizvMdswrkGgZfAL50zg0xtFCoH9CBNqqYEwba/24LUH5IMbjQCyu78DnPpISo6P 5MUKyFBhF7pcaPXZWSLFFlLMFqZPr5w2fUtFApHGKalfWdhxc30ga7kiaL2UyD4Q0GT3 hOaPq6aiXVvG1TjQMcXsUrpBeqln8l6AZvNpJqqzVQURXWNjphcTpAEeV0C6t4xCp1Ui KnojVrYL108fgbGDwa6YvCZ+w844lf+Yk90ZFBaPUskA08GOOEO74akJKmBm5ydFJsdN /cew== X-Gm-Message-State: APjAAAVS24rLzkV0qNppCSfHsinwTmYHtfcgNFuOtJELcOgJWAC80VNk 6dkrmui2KkiIJ6iddFP6/BeAqw== X-Received: by 2002:aa7:9407:: with SMTP id x7mr15929124pfo.163.1564041395498; Thu, 25 Jul 2019 00:56:35 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id m9sm89021419pgr.24.2019.07.25.00.56.32 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 Jul 2019 00:56:35 -0700 (PDT) From: Baolin Wang To: wsa+renesas@sang-engineering.com, orsonzhai@gmail.com, zhang.lyra@gmail.com Cc: baolin.wang@linaro.org, vincent.guittot@linaro.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] i2c: sprd: Make I2C driver can be built as a module Date: Thu, 25 Jul 2019 15:56:16 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Now there is no need to keep our I2C driver to be initialized so early, thus changing to module level and let it can be built as a module, meanwhile adding some module information. Signed-off-by: Baolin Wang --- drivers/i2c/busses/Kconfig | 2 +- drivers/i2c/busses/i2c-sprd.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) -- 1.7.9.5 diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 09367fc..69f1931 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -977,7 +977,7 @@ config I2C_SIRF will be called i2c-sirf. config I2C_SPRD - bool "Spreadtrum I2C interface" + tristate "Spreadtrum I2C interface" depends on I2C=y && ARCH_SPRD help If you say yes to this option, support will be included for the diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c index 9611235..8002835 100644 --- a/drivers/i2c/busses/i2c-sprd.c +++ b/drivers/i2c/busses/i2c-sprd.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -644,8 +645,7 @@ static int __maybe_unused sprd_i2c_runtime_resume(struct device *dev) }, }; -static int sprd_i2c_init(void) -{ - return platform_driver_register(&sprd_i2c_driver); -} -arch_initcall_sync(sprd_i2c_init); +module_platform_driver(sprd_i2c_driver); + +MODULE_DESCRIPTION("Spreadtrum I2C master controller driver"); +MODULE_LICENSE("GPL v2");