| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | | - * Copyright (C) 2010-2013 Bluecherry, LLC <http://www.bluecherrydvr.com> |
|---|
| 3 | + * Copyright (C) 2010-2013 Bluecherry, LLC <https://www.bluecherrydvr.com> |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Original author: |
|---|
| 5 | 6 | * Ben Collins <bcollins@ubuntu.com> |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Additional work by: |
|---|
| 8 | 9 | * John Brooks <john.brooks@bluecherry.net> |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 12 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 13 | | - * (at your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 18 | | - * GNU General Public License for more details. |
|---|
| 19 | 10 | */ |
|---|
| 20 | 11 | |
|---|
| 21 | 12 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 48 | 39 | ret = solo_reg_read(solo_dev, SOLO_GPIO_CONFIG_1); |
|---|
| 49 | 40 | |
|---|
| 50 | 41 | for (port = 0; port < 16; port++) { |
|---|
| 51 | | - if (!((1 << (port + 16)) & port_mask)) |
|---|
| 42 | + if (!((1UL << (port + 16)) & port_mask)) |
|---|
| 52 | 43 | continue; |
|---|
| 53 | 44 | |
|---|
| 54 | 45 | if (!mode) |
|---|
| 55 | | - ret &= ~(1 << port); |
|---|
| 46 | + ret &= ~(1UL << port); |
|---|
| 56 | 47 | else |
|---|
| 57 | | - ret |= 1 << port; |
|---|
| 48 | + ret |= 1UL << port; |
|---|
| 58 | 49 | } |
|---|
| 59 | 50 | |
|---|
| 60 | 51 | /* Enable GPIO[31:16] */ |
|---|