Skip to content

Commit

Permalink
[PATCH] PCI: fix pci_request_region[s] arg
Browse files Browse the repository at this point in the history
    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.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jeff Garzik authored and Greg Kroah-Hartman committed Mar 23, 2006
1 parent 309e57d commit 3c990e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ void pci_release_region(struct pci_dev *pdev, int bar)
* 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;
Expand Down Expand Up @@ -697,7 +697,7 @@ void pci_release_regions(struct pci_dev *pdev)
* 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;

Expand Down
4 changes: 2 additions & 2 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,9 @@ void pdev_sort_resources(struct pci_dev *, struct resource_list *);
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 */
Expand Down

0 comments on commit 3c990e9

Please sign in to comment.