From patchwork Wed Jun 17 04:55:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 30788 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n5H4xN4t023776 for ; Wed, 17 Jun 2009 04:59:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752613AbZFQE7M (ORCPT ); Wed, 17 Jun 2009 00:59:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752182AbZFQE7L (ORCPT ); Wed, 17 Jun 2009 00:59:11 -0400 Received: from wf-out-1314.google.com ([209.85.200.174]:22942 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751724AbZFQE7H (ORCPT ); Wed, 17 Jun 2009 00:59:07 -0400 Received: by wf-out-1314.google.com with SMTP id 26so60191wfd.4 for ; Tue, 16 Jun 2009 21:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=izdesfNAo3i3hsiTJLu9uolIZ9T2cPpp6u/NkAYBUe4=; b=EB8vqdgIZqHUfvf8HB+UjcIonLW2skKflTSjIRrgEucaih887x43aF/BBmPCDOSh7c rCVOzTGzZdIGWOlNUth3FzKM1GNu+/mhWyzUP2wiGLQhW+SywQX+5TTfHOl0e0i+0sUQ 0+K5uichJh8kXhun30+2dt2Q/qtfnzgQC6GNk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=I83Af2oDykoFf709XDdxSZzEU1jNXarXwf3qIuSB4BIrlkf0OY2n0KxLHkkkqKDo70 0QVTJCsxFAyzdYl5TfFioCNmnldgXLba+/KEPXY3tvIz2/xU10szR6S4eXodp2nwK27J f8/bkW51Sm3NiIJmpaE0OpHl0FGBYMGw5SSUc= Received: by 10.143.8.10 with SMTP id l10mr4839231wfi.190.1245214750517; Tue, 16 Jun 2009 21:59:10 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id 32sm38177wfc.14.2009.06.16.21.59.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Jun 2009 21:59:09 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Wed, 17 Jun 2009 13:55:42 +0900 Message-Id: <20090617045542.15363.17704.sendpatchset@rx1.opensource.se> Subject: [PATCH] sh: use kzalloc() for cpg clocks Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org From: Magnus Damm Convert the shared clock cpg code from bootmem to slab. Without this patch the current bootmem code triggers WARN_ON() because the slab is available. Signed-off-by: Magnus Damm --- arch/sh/kernel/cpu/clock-cpg.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/arch/sh/kernel/cpu/clock-cpg.c +++ work/arch/sh/kernel/cpu/clock-cpg.c 2009-06-16 15:10:29.000000000 +0900 @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include @@ -127,10 +127,11 @@ int __init sh_clk_div6_register(struct c int k; freq_table_size *= (nr_divs + 1); - - freq_table = alloc_bootmem(freq_table_size * nr); - if (!freq_table) + freq_table = kzalloc(freq_table_size * nr, GFP_KERNEL); + if (!freq_table) { + pr_err("sh_clk_div6_register: unable to alloc memory\n"); return -ENOMEM; + } for (k = 0; !ret && (k < nr); k++) { clkp = clks + k; @@ -175,10 +176,11 @@ int __init sh_clk_div4_register(struct c int k; freq_table_size *= (nr_divs + 1); - - freq_table = alloc_bootmem(freq_table_size * nr); - if (!freq_table) + freq_table = kzalloc(freq_table_size * nr, GFP_KERNEL); + if (!freq_table) { + pr_err("sh_clk_div4_register: unable to alloc memory\n"); return -ENOMEM; + } for (k = 0; !ret && (k < nr); k++) { clkp = clks + k;