From: Rene Herman <rene.herman@keyaccess.nl>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: [PATCH] PNP: make the resource type an unsigned long
Date: Fri, 08 Aug 2008 08:39:45 +0200 [thread overview]
Message-ID: <489BEA31.3040101@keyaccess.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 144 bytes --]
Hi Bjorn.
Andrew earlier commented that pci_resourec_flags() returns an unsigned
long. Had this hanging around a local branch. Useful?
Rene.
[-- Attachment #2: 0001-PNP-make-the-resource-type-an-unsigned-long.patch --]
[-- Type: text/plain, Size: 2113 bytes --]
>From ddab0bc46eb538c957357549ae2ba657db3887a3 Mon Sep 17 00:00:00 2001
From: Rene Herman <rene.herman@gmail.com>
Date: Thu, 26 Jun 2008 00:14:08 +0200
Subject: [PATCH] PNP: make the resource type an unsigned long
PnP encodes the resource type directly as its struct resource->flags
value which is an unsigned long. Make it so...
Signed-off-by: Rene Herman <rene.herman@gmail.com>
---
drivers/pnp/base.h | 2 +-
drivers/pnp/resource.c | 4 ++--
include/linux/pnp.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pnp/base.h b/drivers/pnp/base.h
index 9fd7bb9..7cc7bf5 100644
--- a/drivers/pnp/base.h
+++ b/drivers/pnp/base.h
@@ -147,7 +147,7 @@ char *pnp_resource_type_name(struct resource *res);
void dbg_pnp_show_resources(struct pnp_dev *dev, char *desc);
void pnp_free_resources(struct pnp_dev *dev);
-int pnp_resource_type(struct resource *res);
+unsigned long pnp_resource_type(struct resource *res);
struct pnp_resource {
struct list_head list;
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 4cfe3a1..dbae23a 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -467,14 +467,14 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
#endif
}
-int pnp_resource_type(struct resource *res)
+unsigned long pnp_resource_type(struct resource *res)
{
return res->flags & (IORESOURCE_IO | IORESOURCE_MEM |
IORESOURCE_IRQ | IORESOURCE_DMA);
}
struct resource *pnp_get_resource(struct pnp_dev *dev,
- unsigned int type, unsigned int num)
+ unsigned long type, unsigned int num)
{
struct pnp_resource *pnp_res;
struct resource *res;
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 1ce54b6..97c8022 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -21,7 +21,7 @@ struct pnp_dev;
/*
* Resource Management
*/
-struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int);
+struct resource *pnp_get_resource(struct pnp_dev *, unsigned long, unsigned int);
static inline int pnp_resource_valid(struct resource *res)
{
--
1.5.5
next reply other threads:[~2008-08-08 6:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-08 6:39 Rene Herman [this message]
2008-08-08 21:55 ` [PATCH] PNP: make the resource type an unsigned long H. Peter Anvin
2008-08-09 5:21 ` Rene Herman
2008-08-09 5:25 ` H. Peter Anvin
2008-08-09 5:32 ` Rene Herman
2008-08-11 21:59 ` Bjorn Helgaas
2008-08-11 22:08 ` H. Peter Anvin
2008-08-11 22:18 ` Bjorn Helgaas
2008-08-12 4:15 ` Rene Herman
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=489BEA31.3040101@keyaccess.nl \
--to=rene.herman@keyaccess.nl \
--cc=akpm@osdl.org \
--cc=bjorn.helgaas@hp.com \
--cc=linux-kernel@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