hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/firewire/core-card.c
....@@ -1,19 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2005-2007 Kristian Hoegsberg <krh@bitplanet.net>
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
14
- * You should have received a copy of the GNU General Public License
15
- * along with this program; if not, write to the Free Software Foundation,
16
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
174 */
185
196 #include <linux/bug.h>
....@@ -681,6 +668,7 @@
681668 void fw_core_remove_card(struct fw_card *card)
682669 {
683670 struct fw_card_driver dummy_driver = dummy_driver_template;
671
+ unsigned long flags;
684672
685673 card->driver->update_phy_reg(card, 4,
686674 PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
....@@ -695,7 +683,9 @@
695683 dummy_driver.stop_iso = card->driver->stop_iso;
696684 card->driver = &dummy_driver;
697685
686
+ spin_lock_irqsave(&card->lock, flags);
698687 fw_destroy_nodes(card);
688
+ spin_unlock_irqrestore(&card->lock, flags);
699689
700690 /* Wait for all users, especially device workqueue jobs, to finish. */
701691 fw_card_put(card);