summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/media/i2c/s5c73m3
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/media/i2c/s5c73m3')
-rw-r--r--kernel/drivers/media/i2c/s5c73m3/s5c73m3-core.c4
-rw-r--r--kernel/drivers/media/i2c/s5c73m3/s5c73m3-spi.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/kernel/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/kernel/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index 08b234bd2..51b260104 100644
--- a/kernel/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/kernel/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -167,7 +167,7 @@ static int s5c73m3_i2c_read(struct i2c_client *client, u16 addr, u16 *data)
*/
ret = i2c_transfer(client->adapter, msg, 2);
if (ret == 2) {
- *data = be16_to_cpup((u16 *)rbuf);
+ *data = be16_to_cpup((__be16 *)rbuf);
v4l2_dbg(4, s5c73m3_dbg, client,
"%s: addr: 0x%04x, data: 0x%04x\n",
__func__, addr, *data);
@@ -1453,7 +1453,7 @@ static int s5c73m3_oif_set_power(struct v4l2_subdev *sd, int on)
state->apply_fiv = 1;
state->apply_fmt = 1;
}
- } else if (!on == state->power) {
+ } else if (state->power == !on) {
ret = s5c73m3_set_af_softlanding(state);
if (!ret)
ret = __s5c73m3_power_off(state);
diff --git a/kernel/drivers/media/i2c/s5c73m3/s5c73m3-spi.c b/kernel/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
index 63eb19093..72ef9f936 100644
--- a/kernel/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
+++ b/kernel/drivers/media/i2c/s5c73m3/s5c73m3-spi.c
@@ -31,6 +31,7 @@ static const struct of_device_id s5c73m3_spi_ids[] = {
{ .compatible = "samsung,s5c73m3" },
{ }
};
+MODULE_DEVICE_TABLE(of, s5c73m3_spi_ids);
enum spi_direction {
SPI_DIR_RX,
@@ -149,8 +150,6 @@ int s5c73m3_register_spi_driver(struct s5c73m3 *state)
spidrv->remove = s5c73m3_spi_remove;
spidrv->probe = s5c73m3_spi_probe;
spidrv->driver.name = S5C73M3_SPI_DRV_NAME;
- spidrv->driver.bus = &spi_bus_type;
- spidrv->driver.owner = THIS_MODULE;
spidrv->driver.of_match_table = s5c73m3_spi_ids;
return spi_register_driver(spidrv);