lkml.org 
[lkml]   [2006]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fix pci_request_region[s] arg


I just checked this fix into the 'res' branch of jgarzik/misc-2.6.git...

arguably it can go into 2.6.16-rc but its low priority. Without this it
causes a bogus warning in some cases.



commit 3175376926eba8706b8e6b62c9d86cfde92bc15e
Author: Jeff Garzik <jeff@garzik.org>
Date: Sat Mar 4 21:46:56 2006 -0500

Add missing 'const' to pci_request_region[s] 'res_name' arg,
since we pass it directly to __request_region(), whose 'name' arg
is also const.

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d2d1879..7fad922 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -639,7 +639,7 @@ void pci_release_region(struct pci_dev *
* Returns 0 on success, or %EBUSY on error. A warning
* message is also printed on failure.
*/
-int pci_request_region(struct pci_dev *pdev, int bar, char *res_name)
+int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name)
{
if (pci_resource_len(pdev, bar) == 0)
return 0;
@@ -697,7 +697,7 @@ void pci_release_regions(struct pci_dev
* Returns 0 on success, or %EBUSY on error. A warning
* message is also printed on failure.
*/
-int pci_request_regions(struct pci_dev *pdev, char *res_name)
+int pci_request_regions(struct pci_dev *pdev, const char *res_name)
{
int i;

diff --git a/include/linux/pci.h b/include/linux/pci.h
index fe1a2b0..6336e1b 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -485,9 +485,9 @@ void pdev_sort_resources(struct pci_dev
void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
int (*)(struct pci_dev *, u8, u8));
#define HAVE_PCI_REQ_REGIONS 2
-int pci_request_regions(struct pci_dev *, char *);
+int pci_request_regions(struct pci_dev *, const char *);
void pci_release_regions(struct pci_dev *);
-int pci_request_region(struct pci_dev *, int, char *);
+int pci_request_region(struct pci_dev *, int, const char *);
void pci_release_region(struct pci_dev *, int);

/* drivers/pci/bus.c */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-03-05 03:55    [W:0.047 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site