.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
17 | 4 | */ |
---|
18 | 5 | |
---|
19 | 6 | #include <linux/bug.h> |
---|
.. | .. |
---|
681 | 668 | void fw_core_remove_card(struct fw_card *card) |
---|
682 | 669 | { |
---|
683 | 670 | struct fw_card_driver dummy_driver = dummy_driver_template; |
---|
| 671 | + unsigned long flags; |
---|
684 | 672 | |
---|
685 | 673 | card->driver->update_phy_reg(card, 4, |
---|
686 | 674 | PHY_LINK_ACTIVE | PHY_CONTENDER, 0); |
---|
.. | .. |
---|
695 | 683 | dummy_driver.stop_iso = card->driver->stop_iso; |
---|
696 | 684 | card->driver = &dummy_driver; |
---|
697 | 685 | |
---|
| 686 | + spin_lock_irqsave(&card->lock, flags); |
---|
698 | 687 | fw_destroy_nodes(card); |
---|
| 688 | + spin_unlock_irqrestore(&card->lock, flags); |
---|
699 | 689 | |
---|
700 | 690 | /* Wait for all users, especially device workqueue jobs, to finish. */ |
---|
701 | 691 | fw_card_put(card); |
---|