Commit 40110361 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Greg Kroah-Hartman

media: si470x: fix __be16 annotations

[ Upstream commit 90db5c82 ]

The annotations there are wrong as warned:
   drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:129:24: warning: incorrect type in assignment (different base types)
   drivers/media/radio/si470x/radio-si470x-i2c.c:129:24:    expected unsigned short [unsigned] [short] <noident>
   drivers/media/radio/si470x/radio-si470x-i2c.c:129:24:    got restricted __be16 [usertype] <noident>
   drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
   drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e8738c1
...@@ -96,7 +96,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum block errors: *1*"); ...@@ -96,7 +96,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum block errors: *1*");
*/ */
int si470x_get_register(struct si470x_device *radio, int regnr) int si470x_get_register(struct si470x_device *radio, int regnr)
{ {
u16 buf[READ_REG_NUM]; __be16 buf[READ_REG_NUM];
struct i2c_msg msgs[1] = { struct i2c_msg msgs[1] = {
{ {
.addr = radio->client->addr, .addr = radio->client->addr,
...@@ -121,7 +121,7 @@ int si470x_get_register(struct si470x_device *radio, int regnr) ...@@ -121,7 +121,7 @@ int si470x_get_register(struct si470x_device *radio, int regnr)
int si470x_set_register(struct si470x_device *radio, int regnr) int si470x_set_register(struct si470x_device *radio, int regnr)
{ {
int i; int i;
u16 buf[WRITE_REG_NUM]; __be16 buf[WRITE_REG_NUM];
struct i2c_msg msgs[1] = { struct i2c_msg msgs[1] = {
{ {
.addr = radio->client->addr, .addr = radio->client->addr,
...@@ -151,7 +151,7 @@ int si470x_set_register(struct si470x_device *radio, int regnr) ...@@ -151,7 +151,7 @@ int si470x_set_register(struct si470x_device *radio, int regnr)
static int si470x_get_all_registers(struct si470x_device *radio) static int si470x_get_all_registers(struct si470x_device *radio)
{ {
int i; int i;
u16 buf[READ_REG_NUM]; __be16 buf[READ_REG_NUM];
struct i2c_msg msgs[1] = { struct i2c_msg msgs[1] = {
{ {
.addr = radio->client->addr, .addr = radio->client->addr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment