| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for the Conexant CX23885 PCIe bridge |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2006 Steven Toth <stoth@linuxtv.org> |
|---|
| 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 | | - * |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | 6 | */ |
|---|
| 17 | 7 | |
|---|
| 18 | 8 | #include "cx23885.h" |
|---|
| 19 | 9 | |
|---|
| 20 | 10 | #include <linux/module.h> |
|---|
| 21 | | -#include <linux/moduleparam.h> |
|---|
| 22 | 11 | #include <linux/init.h> |
|---|
| 23 | 12 | #include <linux/delay.h> |
|---|
| 24 | 13 | #include <asm/io.h> |
|---|
| .. | .. |
|---|
| 317 | 306 | bus->i2c_client = cx23885_i2c_client_template; |
|---|
| 318 | 307 | bus->i2c_adap.dev.parent = &dev->pci->dev; |
|---|
| 319 | 308 | |
|---|
| 320 | | - strlcpy(bus->i2c_adap.name, bus->dev->name, |
|---|
| 309 | + strscpy(bus->i2c_adap.name, bus->dev->name, |
|---|
| 321 | 310 | sizeof(bus->i2c_adap.name)); |
|---|
| 322 | 311 | |
|---|
| 323 | 312 | bus->i2c_adap.algo_data = bus; |
|---|
| .. | .. |
|---|
| 340 | 329 | /* Instantiate the IR receiver device, if present */ |
|---|
| 341 | 330 | if (0 == bus->i2c_rc) { |
|---|
| 342 | 331 | struct i2c_board_info info; |
|---|
| 343 | | - const unsigned short addr_list[] = { |
|---|
| 332 | + static const unsigned short addr_list[] = { |
|---|
| 344 | 333 | 0x6b, I2C_CLIENT_END |
|---|
| 345 | 334 | }; |
|---|
| 346 | 335 | |
|---|
| 347 | 336 | memset(&info, 0, sizeof(struct i2c_board_info)); |
|---|
| 348 | | - strlcpy(info.type, "ir_video", I2C_NAME_SIZE); |
|---|
| 337 | + strscpy(info.type, "ir_video", I2C_NAME_SIZE); |
|---|
| 349 | 338 | /* Use quick read command for probe, some IR chips don't |
|---|
| 350 | 339 | * support writes */ |
|---|
| 351 | | - i2c_new_probed_device(&bus->i2c_adap, &info, addr_list, |
|---|
| 352 | | - i2c_probe_func_quick_read); |
|---|
| 340 | + i2c_new_scanned_device(&bus->i2c_adap, &info, addr_list, |
|---|
| 341 | + i2c_probe_func_quick_read); |
|---|
| 353 | 342 | } |
|---|
| 354 | 343 | |
|---|
| 355 | 344 | return bus->i2c_rc; |
|---|