Skip to content

Commit

Permalink
removed unneeded lines in add_pci_device() #25
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaku committed Feb 25, 2023
1 parent 4362046 commit ff44563
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/pci/pci.c
Expand Up @@ -82,7 +82,6 @@ static int is_mechanism_1_supported(void)

static void add_pci_device(int bus, int dev, int func, struct pci_device *pci_dev)
{
unsigned long int flags;
struct pci_device *pdt;

if(!(pdt = (struct pci_device *)kmalloc2(sizeof(struct pci_device)))) {
Expand All @@ -97,15 +96,13 @@ static void add_pci_device(int bus, int dev, int func, struct pci_device *pci_de
pci_dev->pin = pci_read_char(bus, dev, func, PCI_INTERRUPT_PIN);
*pdt = *pci_dev;

SAVE_FLAGS(flags); CLI();
if(!pci_device_table) {
pci_device_table = pdt;
} else {
pdt->prev = pci_device_table->prev;
pci_device_table->prev->next = pdt;
}
pci_device_table->prev = pdt;
RESTORE_FLAGS(flags);
}

static void scan_bus(void)
Expand Down

0 comments on commit ff44563

Please sign in to comment.