diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2020-02-24 15:23:35 +0530 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2020-02-24 10:07:52 +0000 |
commit | 3d3248dbd018502f654064c78efcd2e165ab3486 (patch) | |
tree | 12af4c31ba120e244005a9c7940a31dbe17e9b45 /include/linux/pci-epc.h | |
parent | 5779dd0a7dbd71e82478fb0bf125cc6cd3c43266 (diff) |
PCI: endpoint: Replace spinlock with mutex
The pci_epc_ops is not intended to be invoked from interrupt context.
Hence replace spin_lock_irqsave and spin_unlock_irqrestore with
mutex_lock and mutex_unlock respectively.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'include/linux/pci-epc.h')
-rw-r--r-- | include/linux/pci-epc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h index 36644ccd32ac..9dd60f2e9705 100644 --- a/include/linux/pci-epc.h +++ b/include/linux/pci-epc.h @@ -88,7 +88,7 @@ struct pci_epc_mem { * @mem: address space of the endpoint controller * @max_functions: max number of functions that can be configured in this EPC * @group: configfs group representing the PCI EPC device - * @lock: spinlock to protect pci_epc ops + * @lock: mutex to protect pci_epc ops * @notifier: used to notify EPF of any EPC events (like linkup) */ struct pci_epc { @@ -98,8 +98,8 @@ struct pci_epc { struct pci_epc_mem *mem; u8 max_functions; struct config_group *group; - /* spinlock to protect against concurrent access of EP controller */ - spinlock_t lock; + /* mutex to protect against concurrent access of EP controller */ + struct mutex lock; struct atomic_notifier_head notifier; }; |