From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH/RFC 01/16] platform: Make platform resources input parameters const
Date: Sat, 18 Apr 2009 20:52:09 +0200 [thread overview]
Message-ID: <1240080744-14995-2-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1240080744-14995-1-git-send-email-geert@linux-m68k.org>
Make the platform resources input parameters of platform_device_add_resources()
and platform_device_register_simple() const, as the resources are copied and
never modified.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/base/platform.c | 4 ++--
include/linux/platform_device.h | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index b5b6c97..2c83e21 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -184,7 +184,7 @@ EXPORT_SYMBOL_GPL(platform_device_alloc);
* released.
*/
int platform_device_add_resources(struct platform_device *pdev,
- struct resource *res, unsigned int num)
+ const struct resource *res, unsigned int num)
{
struct resource *r;
@@ -379,7 +379,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister);
*/
struct platform_device *platform_device_register_simple(const char *name,
int id,
- struct resource *res,
+ const struct resource *res,
unsigned int num)
{
struct platform_device *pdev;
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 72736fd..1391a5d 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -42,12 +42,14 @@ extern int platform_get_irq_byname(struct platform_device *, char *);
extern int platform_add_devices(struct platform_device **, int);
extern struct platform_device *platform_device_register_simple(const char *, int id,
- struct resource *, unsigned int);
+ const struct resource *, unsigned int);
extern struct platform_device *platform_device_register_data(struct device *,
const char *, int, const void *, size_t);
extern struct platform_device *platform_device_alloc(const char *name, int id);
-extern int platform_device_add_resources(struct platform_device *pdev, struct resource *res, unsigned int num);
+extern int platform_device_add_resources(struct platform_device *pdev,
+ const struct resource *res,
+ unsigned int num);
extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size);
extern int platform_device_add(struct platform_device *pdev);
extern void platform_device_del(struct platform_device *pdev);
--
1.6.2.3
next prev parent reply other threads:[~2009-04-18 18:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-18 18:52 [PATCH/RFC 0/16] m68k: Device model patches Geert Uytterhoeven
2009-04-18 18:52 ` Geert Uytterhoeven [this message]
2009-04-18 18:52 ` [PATCH/RFC 02/16] m68k: amiga - Zorro bus modalias support Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 03/16] m68k: amiga - Zorro host bridge platform device conversion Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 04/16] m68k: amiga - Frame buffer " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 05/16] m68k: amiga - Sound " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 06/16] m68k: amiga - Floppy " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 07/16] m68k: amiga - A3000 SCSI " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 08/16] m68k: amiga - A4000T " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 09/16] m68k: amiga - Amiga Gayle IDE " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 10/16] m68k: amiga - Keyboard " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 11/16] m68k: amiga - Mouse " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 12/16] m68k: amiga - Serial port " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 13/16] m68k: amiga - Parallel " Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 14/16] rtc: Add an RTC driver for the Oki MSM6242 Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 15/16] rtc: Add an RTC driver for the Ricoh RP5C01 Geert Uytterhoeven
2009-04-18 18:52 ` [PATCH/RFC 16/16] m68k: amiga - RTC platform device conversion Geert Uytterhoeven
2009-04-18 21:55 ` [rtc-linux] [PATCH/RFC 15/16] rtc: Add an RTC driver for the Ricoh RP5C01 Alessandro Zummo
2009-04-19 18:41 ` Geert Uytterhoeven
2009-04-19 18:56 ` [rtc-linux] " Alessandro Zummo
2009-04-18 21:57 ` [rtc-linux] [PATCH/RFC 14/16] rtc: Add an RTC driver for the Oki MSM6242 Alessandro Zummo
2009-04-18 23:25 ` [PATCH/RFC 01/16] platform: Make platform resources input parameters const Greg KH
2009-04-19 18:23 ` Geert Uytterhoeven
2009-05-05 7:36 ` [PATCH/RFC 0/16] m68k: Device model patches Geert Uytterhoeven
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=1240080744-14995-2-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox