From patchwork Sun Oct 19 06:11:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 400740 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C915A140092 for ; Sun, 19 Oct 2014 17:13:54 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id AB2BB1A0A94 for ; Sun, 19 Oct 2014 17:13:54 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 0E4411A0639 for ; Sun, 19 Oct 2014 17:12:43 +1100 (AEDT) Received: by mail-pa0-f51.google.com with SMTP id lj1so3156583pab.24 for ; Sat, 18 Oct 2014 23:12:42 -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=r1J4IkG+EaLaPLULFymcM76zE81mu16DjhInCp/8s7U=; b=HOAEMSWrDWpsuWu5cpOYv+PL+pCtDNsj6zNxfMKHFZjtUMVxJY5+r/t05ZjaMAZigv k6c2H3/xnI0fpnBgxQCLOVCvO9mSHNI2hF47TbNUfoLBwc1xEKW35fxppAVgEifJyMm1 gdB3ymjeTGHtj89PerQ2notD5HGHFrrUzzyrAiyYzR5BgMS1XDScRcbGdHS+6McORIGQ AAHavut5wZoJx6MLv2+y9PA0YD02IEUL1EcJYo3g1M0vMfVXiVFD/fj+lIpdg8ILgVpc w1d7+YA3noQOhl+SL/kesILGpfIaCL3wU3SHAAUfBAgGsEmFDHzfaMKgXIN1r0wA65Xn H1/A== X-Received: by 10.68.110.1 with SMTP id hw1mr19024352pbb.7.1413699162155; Sat, 18 Oct 2014 23:12:42 -0700 (PDT) Received: from pek-khao-d1.corp.ad.wrs.com ([106.120.101.38]) by mx.google.com with ESMTPSA id iv9sm5669224pbc.53.2014.10.18.23.12.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Oct 2014 23:12:41 -0700 (PDT) From: Kevin Hao To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 1/3] Revert "clk: ppc-corenet: Fix Section mismatch warning" Date: Sun, 19 Oct 2014 14:11:37 +0800 Message-Id: <1413699099-25743-2-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1413699099-25743-1-git-send-email-haokexin@gmail.com> References: <1413699099-25743-1-git-send-email-haokexin@gmail.com> Cc: Scott Wood , Gerhard Sittig , Mike Turquette , Jingchang Lu X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This reverts commit da788acb28386aa896224e784954bb73c99ff26c. That commit tried to fix the section mismatch warning by moving the ppc_corenet_clk_driver struct to init section. This is definitely wrong because the kernel would free the memories occupied by this struct after boot while this driver is still registered in the driver core. The kernel would panic when accessing this driver struct. Signed-off-by: Kevin Hao --- A new patch in v2. drivers/clk/clk-ppc-corenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-corenet.c index 8e58edfeeb37..8b284be4efa4 100644 --- a/drivers/clk/clk-ppc-corenet.c +++ b/drivers/clk/clk-ppc-corenet.c @@ -291,7 +291,7 @@ static const struct of_device_id ppc_clk_ids[] __initconst = { {} }; -static struct platform_driver ppc_corenet_clk_driver __initdata = { +static struct platform_driver ppc_corenet_clk_driver = { .driver = { .name = "ppc_corenet_clock", .owner = THIS_MODULE,