Explorar o código

NFC: driver: correcting prints

corrected few prints and variable names.

Change-Id: Ic870a46eedde3a85d668cf4f13c99d94353a195a
Mallikarjun S T %!s(int64=2) %!d(string=hai) anos
pai
achega
a3c87684dc
Modificáronse 2 ficheiros con 7 adicións e 7 borrados
  1. 6 6
      nfc/common.c
  2. 1 1
      nfc/i2c_drv.c

+ 6 - 6
nfc/common.c

@@ -504,15 +504,15 @@ int nfc_post_init(struct nfc_dev *nfc_dev)
  *
  * Queries the TZ secure libraries if NFC is in secure zone statue or not.
  *
- * Return: 0 if FEATURE_NOT_SUPPORTED/PERIPHERAL_NOT_FOUND/state is 2 and 
- * return 1(non-secure) otherwise
+ * Return: 0 if FEATURE_NOT_SUPPORTED or PERIPHERAL_NOT_FOUND or state = 2(non-secure zone) and
+ *  return 1 if state = 1(secure zone) or error otherwise
  */
 
  bool nfc_hw_secure_check(void)
  {
 	struct Object client_env;
 	struct Object app_object;
-	u32 wifi_uid = HW_NFC_UID;
+	u32 nfc_uid = HW_NFC_UID;
 	union ObjectArg obj_arg[2] = {{{0, 0}}};
 	int ret;
 	bool retstat = 1;
@@ -521,7 +521,7 @@ int nfc_post_init(struct nfc_dev *nfc_dev)
 	ret = get_client_env_object(&client_env);
 	if (ret) {
 		pr_err("Failed to get client_env_object, ret: %d\n", ret);
-		return 1;
+		return retstat;
 	}
 
 	ret = IClientEnv_open(client_env, HW_STATE_UID, &app_object);
@@ -534,12 +534,12 @@ int nfc_post_init(struct nfc_dev *nfc_dev)
 		goto exit_release_clientenv;
 	}
 
-	obj_arg[0].b = (struct ObjectBuf) {&wifi_uid, sizeof(u32)};
+	obj_arg[0].b = (struct ObjectBuf) {&nfc_uid, sizeof(u32)};
 	obj_arg[1].b = (struct ObjectBuf) {&state, sizeof(u8)};
 	ret = Object_invoke(app_object, HW_OP_GET_STATE, obj_arg,
 			ObjectCounts_pack(1, 1, 0, 0));
 
-	pr_info("SMC invoke ret: %d state: %d\n", ret, state);
+	pr_info("TZ ret: %d state: %d\n", ret, state);
 	if (ret) {
 		if (ret == PERIPHERAL_NOT_FOUND) {
 			retstat = 0; /* Do not Assert */

+ 1 - 1
nfc/i2c_drv.c

@@ -427,7 +427,7 @@ int nfc_i2c_dev_probe(struct i2c_client *client, const struct i2c_device_id *id)
 	    else {
 		   nfc_dev->secure_zone = true;
             }
-	    pr_info("%s:nfc_dev->secure_zone = %s", __func__, nfc_dev->secure_zone ? "true" : "false");
+	    pr_info("%s:nfc secure_zone = %s", __func__, nfc_dev->secure_zone ? "true" : "false");
 	}else {
 		nfc_post_init(nfc_dev);
 	}