/*1* Copyright (C) 2007 Antonino Daplas <[email protected]>2*3* This file is subject to the terms and conditions of the GNU General Public4* License. See the file COPYING in the main directory of this archive5* for more details.6*7*/8#include <linux/fb.h>9#include <linux/pci.h>1011int fb_is_primary_device(struct fb_info *info)12{13struct device *device = info->device;14struct pci_dev *pci_dev = NULL;15struct resource *res = NULL;16int retval = 0;1718if (device)19pci_dev = to_pci_dev(device);2021if (pci_dev)22res = &pci_dev->resource[PCI_ROM_RESOURCE];2324if (res && res->flags & IORESOURCE_ROM_SHADOW)25retval = 1;2627return retval;28}29EXPORT_SYMBOL(fb_is_primary_device);30MODULE_LICENSE("GPL");313233