Skip to content

Commit

Permalink
PCI: fix compiler warnings in pci_get_subsys()
Browse files Browse the repository at this point in the history
pci_get_subsys() changed in 2.6.26 so that the from pointer is modified
when the call is being invoked, so fix up the 'const' marking of it that
the compiler is complaining about.

Reported-by: Rufus & Azrael <rufus-azrael@numericable.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Greg KH authored and Jesse Barnes committed Sep 16, 2008
1 parent e1f4f59 commit b08508c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions drivers/pci/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ EXPORT_SYMBOL(pci_find_slot);
* time.
*/
struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device,
const struct pci_dev *from)
struct pci_dev *from)
{
struct pci_dev *pdev;

Expand Down Expand Up @@ -263,7 +263,7 @@ static int match_pci_dev_by_id(struct device *dev, void *data)
* this file.
*/
static struct pci_dev *pci_get_dev_by_id(const struct pci_device_id *id,
const struct pci_dev *from)
struct pci_dev *from)
{
struct device *dev;
struct device *dev_start = NULL;
Expand Down Expand Up @@ -303,7 +303,7 @@ static struct pci_dev *pci_get_dev_by_id(const struct pci_device_id *id,
*/
struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device,
unsigned int ss_vendor, unsigned int ss_device,
const struct pci_dev *from)
struct pci_dev *from)
{
struct pci_dev *pdev;
struct pci_device_id *id;
Expand Down
8 changes: 4 additions & 4 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ extern void pci_sort_breadthfirst(void);
#ifdef CONFIG_PCI_LEGACY
struct pci_dev __deprecated *pci_find_device(unsigned int vendor,
unsigned int device,
const struct pci_dev *from);
struct pci_dev *from);
struct pci_dev __deprecated *pci_find_slot(unsigned int bus,
unsigned int devfn);
#endif /* CONFIG_PCI_LEGACY */
Expand All @@ -550,7 +550,7 @@ struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device,
struct pci_dev *from);
struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device,
unsigned int ss_vendor, unsigned int ss_device,
const struct pci_dev *from);
struct pci_dev *from);
struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn);
struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn);
struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from);
Expand Down Expand Up @@ -816,7 +816,7 @@ _PCI_NOP_ALL(write,)

static inline struct pci_dev *pci_find_device(unsigned int vendor,
unsigned int device,
const struct pci_dev *from)
struct pci_dev *from)
{
return NULL;
}
Expand All @@ -838,7 +838,7 @@ static inline struct pci_dev *pci_get_subsys(unsigned int vendor,
unsigned int device,
unsigned int ss_vendor,
unsigned int ss_device,
const struct pci_dev *from)
struct pci_dev *from)
{
return NULL;
}
Expand Down

0 comments on commit b08508c

Please sign in to comment.