Skip to content

Commit 2966fa0

Browse files
ukleinekjenswi-linaro
authored andcommitted
firmware: tee_bnxt: Make use of tee bus methods
The tee bus got dedicated callbacks for probe and remove. Make use of these. This fixes a runtime warning about the driver needing to be converted to the bus methods. Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
1 parent ae9d338 commit 2966fa0

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

drivers/firmware/broadcom/tee_bnxt_fw.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
181181
return (ver->impl_id == TEE_IMPL_ID_OPTEE);
182182
}
183183

184-
static int tee_bnxt_fw_probe(struct device *dev)
184+
static int tee_bnxt_fw_probe(struct tee_client_device *bnxt_device)
185185
{
186-
struct tee_client_device *bnxt_device = to_tee_client_device(dev);
186+
struct device *dev = &bnxt_device->dev;
187187
int ret, err = -ENODEV;
188188
struct tee_ioctl_open_session_arg sess_arg;
189189
struct tee_shm *fw_shm_pool;
@@ -231,17 +231,15 @@ static int tee_bnxt_fw_probe(struct device *dev)
231231
return err;
232232
}
233233

234-
static int tee_bnxt_fw_remove(struct device *dev)
234+
static void tee_bnxt_fw_remove(struct tee_client_device *bnxt_device)
235235
{
236236
tee_shm_free(pvt_data.fw_shm_pool);
237237
tee_client_close_session(pvt_data.ctx, pvt_data.session_id);
238238
tee_client_close_context(pvt_data.ctx);
239239
pvt_data.ctx = NULL;
240-
241-
return 0;
242240
}
243241

244-
static void tee_bnxt_fw_shutdown(struct device *dev)
242+
static void tee_bnxt_fw_shutdown(struct tee_client_device *bnxt_device)
245243
{
246244
tee_shm_free(pvt_data.fw_shm_pool);
247245
tee_client_close_session(pvt_data.ctx, pvt_data.session_id);
@@ -258,12 +256,12 @@ static const struct tee_client_device_id tee_bnxt_fw_id_table[] = {
258256
MODULE_DEVICE_TABLE(tee, tee_bnxt_fw_id_table);
259257

260258
static struct tee_client_driver tee_bnxt_fw_driver = {
259+
.probe = tee_bnxt_fw_probe,
260+
.remove = tee_bnxt_fw_remove,
261+
.shutdown = tee_bnxt_fw_shutdown,
261262
.id_table = tee_bnxt_fw_id_table,
262263
.driver = {
263264
.name = KBUILD_MODNAME,
264-
.probe = tee_bnxt_fw_probe,
265-
.remove = tee_bnxt_fw_remove,
266-
.shutdown = tee_bnxt_fw_shutdown,
267265
},
268266
};
269267

0 commit comments

Comments
 (0)