From patchwork Wed Jan 27 23:36:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 8145171 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3355DBEEE5 for ; Wed, 27 Jan 2016 23:36:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4DD6620279 for ; Wed, 27 Jan 2016 23:36:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A2372026F for ; Wed, 27 Jan 2016 23:36:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932479AbcA0Xg5 (ORCPT ); Wed, 27 Jan 2016 18:36:57 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:51911 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932241AbcA0Xg4 (ORCPT ); Wed, 27 Jan 2016 18:36:56 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id AE3946046B; Wed, 27 Jan 2016 23:36:55 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id A18356047C; Wed, 27 Jan 2016 23:36:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from sboyd-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id E721460244; Wed, 27 Jan 2016 23:36:54 +0000 (UTC) From: Stephen Boyd To: Yoshinori Sato , Rich Felker Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org Subject: [RFC/PATCH] sh: Use generic clkdev.h header Date: Wed, 27 Jan 2016 15:36:54 -0800 Message-Id: <1453937814-17819-1-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 2.6.3.369.g91ad409 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The generic header file is almost equivalent to the SH one. The only difference is that the SH one supports allocating clkdev lookups early using bootmem allocators instead of the slabs. From what I can tell using visual inspection, the slab is initialized before any clkdev allocation is made under arch/sh. So let's remove the arch specific clkdev.h header and use the generic one instead. Signed-off-by: Stephen Boyd --- Not even compile tested, but done with visual inspection. arch/sh/include/asm/Kbuild | 1 + arch/sh/include/asm/clkdev.h | 33 --------------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 arch/sh/include/asm/clkdev.h diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild index aac452b26aa8..a319745a7b63 100644 --- a/arch/sh/include/asm/Kbuild +++ b/arch/sh/include/asm/Kbuild @@ -1,5 +1,6 @@ generic-y += bitsperlong.h +generic-y += clkdev.h generic-y += cputime.h generic-y += current.h generic-y += delay.h diff --git a/arch/sh/include/asm/clkdev.h b/arch/sh/include/asm/clkdev.h deleted file mode 100644 index c41901465fb0..000000000000 --- a/arch/sh/include/asm/clkdev.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2010 Paul Mundt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Helper for the clk API to assist looking up a struct clk. - */ - -#ifndef __CLKDEV__H_ -#define __CLKDEV__H_ - -#include -#include -#include - -#include - -static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size) -{ - if (!slab_is_available()) - return alloc_bootmem_low_pages(size); - else - return kzalloc(size, GFP_KERNEL); -} - -#ifndef CONFIG_COMMON_CLK -#define __clk_put(clk) -#define __clk_get(clk) ({ 1; }) -#endif - -#endif /* __CLKDEV_H__ */