forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/pci/solo6x10/solo6x10-gpio.c
....@@ -1,21 +1,12 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
2
- * Copyright (C) 2010-2013 Bluecherry, LLC <http://www.bluecherrydvr.com>
3
+ * Copyright (C) 2010-2013 Bluecherry, LLC <https://www.bluecherrydvr.com>
34 *
45 * Original author:
56 * Ben Collins <bcollins@ubuntu.com>
67 *
78 * Additional work by:
89 * 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.
1910 */
2011
2112 #include <linux/kernel.h>
....@@ -48,13 +39,13 @@
4839 ret = solo_reg_read(solo_dev, SOLO_GPIO_CONFIG_1);
4940
5041 for (port = 0; port < 16; port++) {
51
- if (!((1 << (port + 16)) & port_mask))
42
+ if (!((1UL << (port + 16)) & port_mask))
5243 continue;
5344
5445 if (!mode)
55
- ret &= ~(1 << port);
46
+ ret &= ~(1UL << port);
5647 else
57
- ret |= 1 << port;
48
+ ret |= 1UL << port;
5849 }
5950
6051 /* Enable GPIO[31:16] */