forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/media/usb/cx231xx/cx231xx-input.c
....@@ -67,7 +67,7 @@
6767
6868 dev->init_data.name = cx231xx_boards[dev->model].name;
6969
70
- strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
70
+ strscpy(info.type, "ir_video", I2C_NAME_SIZE);
7171 info.platform_data = &dev->init_data;
7272
7373 /*
....@@ -88,7 +88,7 @@
8888 ir_i2c_bus = cx231xx_boards[dev->model].ir_i2c_master;
8989 dev_dbg(dev->dev, "Trying to bind ir at bus %d, addr 0x%02x\n",
9090 ir_i2c_bus, info.addr);
91
- dev->ir_i2c_client = i2c_new_device(
91
+ dev->ir_i2c_client = i2c_new_client_device(
9292 cx231xx_get_i2c_adap(dev, ir_i2c_bus), &info);
9393
9494 return 0;
....@@ -96,7 +96,6 @@
9696
9797 void cx231xx_ir_exit(struct cx231xx *dev)
9898 {
99
- if (dev->ir_i2c_client)
100
- i2c_unregister_device(dev->ir_i2c_client);
99
+ i2c_unregister_device(dev->ir_i2c_client);
101100 dev->ir_i2c_client = NULL;
102101 }