| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2008-2010 |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * - Kurt Van Dijck, EIA Electronics |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the version 2 of the GNU General Public License |
|---|
| 8 | | - * as published by the Free Software Foundation |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License |
|---|
| 16 | | - * along with this program; if not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | 6 | */ |
|---|
| 18 | 7 | |
|---|
| 19 | 8 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 181 | 170 | msg.can_dlc = CAN_ERR_DLC; |
|---|
| 182 | 171 | msg.data[1] = CAN_ERR_CRTL_RX_OVERFLOW; |
|---|
| 183 | 172 | /* |
|---|
| 184 | | - * service to all busses, we don't know which it was applicable |
|---|
| 185 | | - * but only service busses that are online |
|---|
| 173 | + * service to all buses, we don't know which it was applicable |
|---|
| 174 | + * but only service buses that are online |
|---|
| 186 | 175 | */ |
|---|
| 187 | 176 | for (j = 0; j < ARRAY_SIZE(card->net); ++j) { |
|---|
| 188 | 177 | netdev = card->net[j]; |
|---|
| .. | .. |
|---|
| 350 | 339 | continue; |
|---|
| 351 | 340 | priv = netdev_priv(netdev); |
|---|
| 352 | 341 | if (!canif_is_active(netdev)) |
|---|
| 353 | | - /* it makes no sense to wake dead busses */ |
|---|
| 342 | + /* it makes no sense to wake dead buses */ |
|---|
| 354 | 343 | continue; |
|---|
| 355 | 344 | if (priv->tx.pending >= TX_ECHO_SKB_MAX) |
|---|
| 356 | 345 | continue; |
|---|
| .. | .. |
|---|
| 385 | 374 | } |
|---|
| 386 | 375 | |
|---|
| 387 | 376 | /* |
|---|
| 388 | | - * netdev/candev inter-operability |
|---|
| 377 | + * netdev/candev interoperability |
|---|
| 389 | 378 | */ |
|---|
| 390 | 379 | static int softing_netdev_open(struct net_device *ndev) |
|---|
| 391 | 380 | { |
|---|
| .. | .. |
|---|
| 463 | 452 | { |
|---|
| 464 | 453 | int fw_up = 0; |
|---|
| 465 | 454 | |
|---|
| 466 | | - if (mutex_lock_interruptible(&card->fw.lock)) |
|---|
| 455 | + if (mutex_lock_interruptible(&card->fw.lock)) { |
|---|
| 467 | 456 | /* return -ERESTARTSYS */; |
|---|
| 457 | + } |
|---|
| 468 | 458 | fw_up = card->fw.up; |
|---|
| 469 | 459 | card->fw.up = 0; |
|---|
| 470 | 460 | |
|---|
| .. | .. |
|---|
| 699 | 689 | static ssize_t show_##name(struct device *dev, \ |
|---|
| 700 | 690 | struct device_attribute *attr, char *buf) \ |
|---|
| 701 | 691 | { \ |
|---|
| 702 | | - struct softing *card = platform_get_drvdata(to_platform_device(dev)); \ |
|---|
| 692 | + struct softing *card = dev_get_drvdata(dev); \ |
|---|
| 703 | 693 | return sprintf(buf, "%u\n", card->member); \ |
|---|
| 704 | 694 | } \ |
|---|
| 705 | 695 | static DEVICE_ATTR(name, 0444, show_##name, NULL) |
|---|
| .. | .. |
|---|
| 708 | 698 | static ssize_t show_##name(struct device *dev, \ |
|---|
| 709 | 699 | struct device_attribute *attr, char *buf) \ |
|---|
| 710 | 700 | { \ |
|---|
| 711 | | - struct softing *card = platform_get_drvdata(to_platform_device(dev)); \ |
|---|
| 701 | + struct softing *card = dev_get_drvdata(dev); \ |
|---|
| 712 | 702 | return sprintf(buf, "%s\n", card->member); \ |
|---|
| 713 | 703 | } \ |
|---|
| 714 | 704 | static DEVICE_ATTR(name, 0444, show_##name, NULL) |
|---|
| .. | .. |
|---|
| 793 | 783 | goto platform_resource_failed; |
|---|
| 794 | 784 | card->dpram_phys = pres->start; |
|---|
| 795 | 785 | card->dpram_size = resource_size(pres); |
|---|
| 796 | | - card->dpram = ioremap_nocache(card->dpram_phys, card->dpram_size); |
|---|
| 786 | + card->dpram = ioremap(card->dpram_phys, card->dpram_size); |
|---|
| 797 | 787 | if (!card->dpram) { |
|---|
| 798 | 788 | dev_alert(&card->pdev->dev, "dpram ioremap failed\n"); |
|---|
| 799 | 789 | goto ioremap_failed; |
|---|