.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Driver for generic CS4232/CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 chips |
---|
3 | 4 | * Copyright (c) by Jaroslav Kysela <perex@perex.cz> |
---|
4 | | - * |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or modify |
---|
7 | | - * it under the terms of the GNU General Public License as published by |
---|
8 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
9 | | - * (at your option) any later version. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, |
---|
12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * GNU General Public License for more details. |
---|
15 | | - * |
---|
16 | | - * You should have received a copy of the GNU General Public License |
---|
17 | | - * along with this program; if not, write to the Free Software |
---|
18 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
19 | | - * |
---|
20 | 5 | */ |
---|
21 | 6 | |
---|
22 | 7 | #include <linux/init.h> |
---|
.. | .. |
---|
559 | 544 | static int dev; |
---|
560 | 545 | int err; |
---|
561 | 546 | struct snd_card *card; |
---|
562 | | - struct pnp_dev *cdev; |
---|
| 547 | + struct pnp_dev *cdev, *iter; |
---|
563 | 548 | char cid[PNP_ID_LEN]; |
---|
564 | 549 | |
---|
565 | 550 | if (pnp_device_is_isapnp(pdev)) |
---|
.. | .. |
---|
575 | 560 | strcpy(cid, pdev->id[0].id); |
---|
576 | 561 | cid[5] = '1'; |
---|
577 | 562 | cdev = NULL; |
---|
578 | | - list_for_each_entry(cdev, &(pdev->protocol->devices), protocol_list) { |
---|
579 | | - if (!strcmp(cdev->id[0].id, cid)) |
---|
| 563 | + list_for_each_entry(iter, &(pdev->protocol->devices), protocol_list) { |
---|
| 564 | + if (!strcmp(iter->id[0].id, cid)) { |
---|
| 565 | + cdev = iter; |
---|
580 | 566 | break; |
---|
| 567 | + } |
---|
581 | 568 | } |
---|
582 | 569 | err = snd_cs423x_card_new(&pdev->dev, dev, &card); |
---|
583 | 570 | if (err < 0) |
---|