.. | .. |
---|
67 | 67 | |
---|
68 | 68 | dev->init_data.name = cx231xx_boards[dev->model].name; |
---|
69 | 69 | |
---|
70 | | - strlcpy(info.type, "ir_video", I2C_NAME_SIZE); |
---|
| 70 | + strscpy(info.type, "ir_video", I2C_NAME_SIZE); |
---|
71 | 71 | info.platform_data = &dev->init_data; |
---|
72 | 72 | |
---|
73 | 73 | /* |
---|
.. | .. |
---|
88 | 88 | ir_i2c_bus = cx231xx_boards[dev->model].ir_i2c_master; |
---|
89 | 89 | dev_dbg(dev->dev, "Trying to bind ir at bus %d, addr 0x%02x\n", |
---|
90 | 90 | ir_i2c_bus, info.addr); |
---|
91 | | - dev->ir_i2c_client = i2c_new_device( |
---|
| 91 | + dev->ir_i2c_client = i2c_new_client_device( |
---|
92 | 92 | cx231xx_get_i2c_adap(dev, ir_i2c_bus), &info); |
---|
93 | 93 | |
---|
94 | 94 | return 0; |
---|
.. | .. |
---|
96 | 96 | |
---|
97 | 97 | void cx231xx_ir_exit(struct cx231xx *dev) |
---|
98 | 98 | { |
---|
99 | | - if (dev->ir_i2c_client) |
---|
100 | | - i2c_unregister_device(dev->ir_i2c_client); |
---|
| 99 | + i2c_unregister_device(dev->ir_i2c_client); |
---|
101 | 100 | dev->ir_i2c_client = NULL; |
---|
102 | 101 | } |
---|