Skip to content

Commit 89027fe

Browse files
andy-shevmchehab
authored andcommitted
media: atomisp: Unify pdev to be pointer to struct pci_device
Unify pdev to be pointer to struct pci_device. While here, reindent some (touched) lines for better readability. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 1cfc859 commit 89027fe

File tree

3 files changed

+127
-151
lines changed

3 files changed

+127
-151
lines changed

drivers/staging/media/atomisp/pci/atomisp_cmd.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -360,39 +360,39 @@ static void clear_isp_irq(enum hrt_isp_css_irq irq)
360360

361361
void atomisp_msi_irq_init(struct atomisp_device *isp)
362362
{
363-
struct pci_dev *dev = to_pci_dev(isp->dev);
363+
struct pci_dev *pdev = to_pci_dev(isp->dev);
364364
u32 msg32;
365365
u16 msg16;
366366

367-
pci_read_config_dword(dev, PCI_MSI_CAPID, &msg32);
367+
pci_read_config_dword(pdev, PCI_MSI_CAPID, &msg32);
368368
msg32 |= 1 << MSI_ENABLE_BIT;
369-
pci_write_config_dword(dev, PCI_MSI_CAPID, msg32);
369+
pci_write_config_dword(pdev, PCI_MSI_CAPID, msg32);
370370

371371
msg32 = (1 << INTR_IER) | (1 << INTR_IIR);
372-
pci_write_config_dword(dev, PCI_INTERRUPT_CTRL, msg32);
372+
pci_write_config_dword(pdev, PCI_INTERRUPT_CTRL, msg32);
373373

374-
pci_read_config_word(dev, PCI_COMMAND, &msg16);
374+
pci_read_config_word(pdev, PCI_COMMAND, &msg16);
375375
msg16 |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
376376
PCI_COMMAND_INTX_DISABLE);
377-
pci_write_config_word(dev, PCI_COMMAND, msg16);
377+
pci_write_config_word(pdev, PCI_COMMAND, msg16);
378378
}
379379

380380
void atomisp_msi_irq_uninit(struct atomisp_device *isp)
381381
{
382-
struct pci_dev *dev = to_pci_dev(isp->dev);
382+
struct pci_dev *pdev = to_pci_dev(isp->dev);
383383
u32 msg32;
384384
u16 msg16;
385385

386-
pci_read_config_dword(dev, PCI_MSI_CAPID, &msg32);
386+
pci_read_config_dword(pdev, PCI_MSI_CAPID, &msg32);
387387
msg32 &= ~(1 << MSI_ENABLE_BIT);
388-
pci_write_config_dword(dev, PCI_MSI_CAPID, msg32);
388+
pci_write_config_dword(pdev, PCI_MSI_CAPID, msg32);
389389

390390
msg32 = 0x0;
391-
pci_write_config_dword(dev, PCI_INTERRUPT_CTRL, msg32);
391+
pci_write_config_dword(pdev, PCI_INTERRUPT_CTRL, msg32);
392392

393-
pci_read_config_word(dev, PCI_COMMAND, &msg16);
393+
pci_read_config_word(pdev, PCI_COMMAND, &msg16);
394394
msg16 &= ~(PCI_COMMAND_MASTER);
395-
pci_write_config_word(dev, PCI_COMMAND, msg16);
395+
pci_write_config_word(pdev, PCI_COMMAND, msg16);
396396
}
397397

398398
static void atomisp_sof_event(struct atomisp_sub_device *asd)

drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,10 +1323,10 @@ EXPORT_SYMBOL_GPL(camera_sensor_csi);
13231323
* trying. The driver itself does direct calls to the PUNIT to manage
13241324
* ISP power.
13251325
*/
1326-
static void isp_pm_cap_fixup(struct pci_dev *dev)
1326+
static void isp_pm_cap_fixup(struct pci_dev *pdev)
13271327
{
1328-
dev_info(&dev->dev, "Disabling PCI power management on camera ISP\n");
1329-
dev->pm_cap = 0;
1328+
dev_info(&pdev->dev, "Disabling PCI power management on camera ISP\n");
1329+
pdev->pm_cap = 0;
13301330
}
13311331
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0f38, isp_pm_cap_fixup);
13321332

0 commit comments

Comments
 (0)