From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 07/08] sh: Remove old physically contiguous reservation code
Date: Thu, 06 Jan 2011 10:16:50 +0000 [thread overview]
Message-ID: <20110106101650.1617.74425.sendpatchset@t400s> (raw)
From: Magnus Damm <damm@opensource.se>
Remove old unused platform_resource_setup_memory().
shmobile_memchunk_setup() should be used instead.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/sh/include/asm/device.h | 2 --
arch/sh/mm/consistent.c | 33 ---------------------------------
2 files changed, 35 deletions(-)
--- 0002/arch/sh/include/asm/device.h
+++ work/arch/sh/include/asm/device.h 2011-01-06 18:40:47.000000000 +0900
@@ -9,8 +9,6 @@ struct dev_archdata {
struct platform_device;
/* allocate contiguous memory chunk and fill in struct resource */
-int platform_resource_setup_memory(struct platform_device *pdev,
- char *name, unsigned long memsize);
int shmobile_memchunk_setup(struct platform_device *pdev,
char *name, unsigned long memsize);
--- 0002/arch/sh/mm/consistent.c
+++ work/arch/sh/mm/consistent.c 2011-01-06 18:40:27.000000000 +0900
@@ -124,39 +124,6 @@ static void __init memchunk_cmdline_over
}
}
-int __init platform_resource_setup_memory(struct platform_device *pdev,
- char *name, unsigned long memsize)
-{
- struct resource *r;
- dma_addr_t dma_handle;
- void *buf;
-
- r = pdev->resource + pdev->num_resources - 1;
- if (r->flags) {
- pr_warning("%s: unable to find empty space for resource\n",
- name);
- return -EINVAL;
- }
-
- memchunk_cmdline_override(name, &memsize);
- if (!memsize)
- return 0;
-
- buf = dma_alloc_coherent(NULL, memsize, &dma_handle, GFP_KERNEL);
- if (!buf) {
- pr_warning("%s: unable to allocate memory\n", name);
- return -ENOMEM;
- }
-
- memset(buf, 0, memsize);
-
- r->flags = IORESOURCE_MEM;
- r->start = dma_handle;
- r->end = r->start + memsize - 1;
- r->name = name;
- return 0;
-}
-
int __init shmobile_memchunk_setup(struct platform_device *pdev,
char *name, unsigned long memsize)
{
reply other threads:[~2011-01-06 10:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20110106101650.1617.74425.sendpatchset@t400s \
--to=magnus.damm@gmail.com \
--cc=linux-sh@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;
as well as URLs for NNTP newsgroup(s).