From: Mark Brown <broonie@opensource.wolfsonmicro.com> To: Arnd Bergmann <arnd@arndb.de>, Russell King <linux@arm.linux.org.uk> Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Brown <broonie@opensource.wolfsonmicro.com> Subject: [PATCH] clkdev: Add default clkdev.h Date: Mon, 14 May 2012 15:19:27 +0100 [thread overview] Message-ID: <1337005167-22628-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw) Ease the deployment of clkdev by providing a default asm/clkdev.h which will be used if the arch does not have an include/asm/clkdev.h. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> --- include/asm-generic/Kbuild.asm | 4 ++++ include/asm-generic/clkdev.h | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 include/asm-generic/clkdev.h diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index c5d2e5d..da121e0 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm @@ -13,6 +13,10 @@ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ header-y += a.out.h endif +ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/clkdev.h),) +generic-y += clkdev.h +endif + header-y += auxvec.h header-y += bitsperlong.h header-y += byteorder.h diff --git a/include/asm-generic/clkdev.h b/include/asm-generic/clkdev.h new file mode 100644 index 0000000..c362a9d --- /dev/null +++ b/include/asm-generic/clkdev.h @@ -0,0 +1,26 @@ +/* + * include/asm-generic/clkdev.h + * + * Based on the ARM clkdev.h: + * Copyright (C) 2008 Russell King. + * + * 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 __ASM_CLKDEV_H +#define __ASM_CLKDEV_H + +#include <linux/slab.h> + +#define __clk_get(clk) ({ 1; }) +#define __clk_put(clk) do { } while (0) + +static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size) +{ + return kzalloc(size, GFP_KERNEL); +} + +#endif -- 1.7.10
WARNING: multiple messages have this Message-ID (diff)
From: broonie@opensource.wolfsonmicro.com (Mark Brown) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] clkdev: Add default clkdev.h Date: Mon, 14 May 2012 15:19:27 +0100 [thread overview] Message-ID: <1337005167-22628-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw) Ease the deployment of clkdev by providing a default asm/clkdev.h which will be used if the arch does not have an include/asm/clkdev.h. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> --- include/asm-generic/Kbuild.asm | 4 ++++ include/asm-generic/clkdev.h | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 include/asm-generic/clkdev.h diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index c5d2e5d..da121e0 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm @@ -13,6 +13,10 @@ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ header-y += a.out.h endif +ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/clkdev.h),) +generic-y += clkdev.h +endif + header-y += auxvec.h header-y += bitsperlong.h header-y += byteorder.h diff --git a/include/asm-generic/clkdev.h b/include/asm-generic/clkdev.h new file mode 100644 index 0000000..c362a9d --- /dev/null +++ b/include/asm-generic/clkdev.h @@ -0,0 +1,26 @@ +/* + * include/asm-generic/clkdev.h + * + * Based on the ARM clkdev.h: + * Copyright (C) 2008 Russell King. + * + * 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 __ASM_CLKDEV_H +#define __ASM_CLKDEV_H + +#include <linux/slab.h> + +#define __clk_get(clk) ({ 1; }) +#define __clk_put(clk) do { } while (0) + +static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size) +{ + return kzalloc(size, GFP_KERNEL); +} + +#endif -- 1.7.10
next reply other threads:[~2012-05-14 16:31 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-05-14 14:19 Mark Brown [this message] 2012-05-14 14:19 ` [PATCH] clkdev: Add default clkdev.h Mark Brown 2012-05-14 19:03 ` Arnd Bergmann 2012-05-14 19:03 ` Arnd Bergmann 2012-05-14 19:09 ` Mark Brown 2012-05-14 19:09 ` Mark Brown 2012-06-14 11:22 Mark Brown 2012-07-02 18:04 Mark Brown 2012-07-03 2:00 ` Stephen Rothwell 2012-07-03 10:12 ` Mark Brown 2012-07-03 11:16 ` Arnd Bergmann 2012-07-03 11:48 ` Mark Brown 2012-07-03 12:05 ` Stephen Rothwell 2012-07-03 12:33 ` Mark Brown 2012-07-03 13:15 ` Stephen Rothwell 2012-07-03 13:39 ` Arnd Bergmann 2012-07-03 13:47 ` Mark Brown 2012-07-09 22:23 ` Mike Turquette 2012-07-09 23:30 ` Russell King - ARM Linux 2012-07-10 17:22 ` Mark Brown 2012-07-10 18:07 ` Arnd Bergmann 2012-07-11 2:44 ` Paul Mundt 2012-07-11 6:32 ` Arnd Bergmann 2012-07-03 15:23 Mark Brown 2012-07-03 15:29 ` Stephen Rothwell 2012-07-04 8:00 ` Geert Uytterhoeven 2012-07-04 9:22 ` Mark Brown 2012-07-03 17:04 Mark Brown 2012-07-03 22:07 ` Stephen Rothwell 2012-08-25 18:16 Mark Brown 2012-08-28 18:56 Mark Brown 2012-09-05 4:04 Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1337005167-22628-1-git-send-email-broonie@opensource.wolfsonmicro.com \ --to=broonie@opensource.wolfsonmicro.com \ --cc=arnd@arndb.de \ --cc=linux-arch@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux@arm.linux.org.uk \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.