aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-12-06 16:15:18 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-01-29 15:50:28 -0500
commit08272db62a92c5b72033c332ced5f631bd9176de (patch)
treec99b6ba8e713e0c10bd60b9470912e2220cefe43 /drivers/media/tuners
parent6c3725332de55c0b668fe6c92fa45dcf8bf00fb9 (diff)
[media] si2157: change firmware variable name and type
Rename firmware variable from fw_file to fw_name and change its type from u8 to const char as request_firmware() input is. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r--drivers/media/tuners/si2157.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 27b488b5f714..fcf139dfdec6 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -82,7 +82,7 @@ static int si2157_init(struct dvb_frontend *fe)
82 int ret, len, remaining; 82 int ret, len, remaining;
83 struct si2157_cmd cmd; 83 struct si2157_cmd cmd;
84 const struct firmware *fw; 84 const struct firmware *fw;
85 u8 *fw_file; 85 const char *fw_name;
86 unsigned int chip_id; 86 unsigned int chip_id;
87 87
88 dev_dbg(&client->dev, "\n"); 88 dev_dbg(&client->dev, "\n");
@@ -123,12 +123,12 @@ static int si2157_init(struct dvb_frontend *fe)
123 switch (chip_id) { 123 switch (chip_id) {
124 case SI2158_A20: 124 case SI2158_A20:
125 case SI2148_A20: 125 case SI2148_A20:
126 fw_file = SI2158_A20_FIRMWARE; 126 fw_name = SI2158_A20_FIRMWARE;
127 break; 127 break;
128 case SI2157_A30: 128 case SI2157_A30:
129 case SI2147_A30: 129 case SI2147_A30:
130 case SI2146_A10: 130 case SI2146_A10:
131 fw_file = NULL; 131 fw_name = NULL;
132 break; 132 break;
133 default: 133 default:
134 dev_err(&client->dev, "unknown chip version Si21%d-%c%c%c\n", 134 dev_err(&client->dev, "unknown chip version Si21%d-%c%c%c\n",
@@ -141,27 +141,27 @@ static int si2157_init(struct dvb_frontend *fe)
141 dev_info(&client->dev, "found a 'Silicon Labs Si21%d-%c%c%c'\n", 141 dev_info(&client->dev, "found a 'Silicon Labs Si21%d-%c%c%c'\n",
142 cmd.args[2], cmd.args[1], cmd.args[3], cmd.args[4]); 142 cmd.args[2], cmd.args[1], cmd.args[3], cmd.args[4]);
143 143
144 if (fw_file == NULL) 144 if (fw_name == NULL)
145 goto skip_fw_download; 145 goto skip_fw_download;
146 146
147 /* request the firmware, this will block and timeout */ 147 /* request the firmware, this will block and timeout */
148 ret = request_firmware(&fw, fw_file, &client->dev); 148 ret = request_firmware(&fw, fw_name, &client->dev);
149 if (ret) { 149 if (ret) {
150 dev_err(&client->dev, "firmware file '%s' not found\n", 150 dev_err(&client->dev, "firmware file '%s' not found\n",
151 fw_file); 151 fw_name);
152 goto err; 152 goto err;
153 } 153 }
154 154
155 /* firmware should be n chunks of 17 bytes */ 155 /* firmware should be n chunks of 17 bytes */
156 if (fw->size % 17 != 0) { 156 if (fw->size % 17 != 0) {
157 dev_err(&client->dev, "firmware file '%s' is invalid\n", 157 dev_err(&client->dev, "firmware file '%s' is invalid\n",
158 fw_file); 158 fw_name);
159 ret = -EINVAL; 159 ret = -EINVAL;
160 goto err_release_firmware; 160 goto err_release_firmware;
161 } 161 }
162 162
163 dev_info(&client->dev, "downloading firmware from file '%s'\n", 163 dev_info(&client->dev, "downloading firmware from file '%s'\n",
164 fw_file); 164 fw_name);
165 165
166 for (remaining = fw->size; remaining > 0; remaining -= 17) { 166 for (remaining = fw->size; remaining > 0; remaining -= 17) {
167 len = fw->data[fw->size - remaining]; 167 len = fw->data[fw->size - remaining];