aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/habanalabs.h
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@gmail.com>2019-04-04 14:33:34 +0300
committerOded Gabbay <oded.gabbay@gmail.com>2019-04-04 14:33:34 +0300
commit295938406cbcb541de8893d0280a2265c41e506d (patch)
tree86246e23694879ea4ab4c1b1d484a3830c6c7058 /drivers/misc/habanalabs/habanalabs.h
parenthabanalabs: refactoring in goya.c (diff)
downloadlinux-dev-295938406cbcb541de8893d0280a2265c41e506d.tar.xz
linux-dev-295938406cbcb541de8893d0280a2265c41e506d.zip
habanalabs: ASIC_AUTO_DETECT enum value is redundant
This patch removes the enum value of ASIC_AUTO_DETECT because we can use the validity of the pdev variable to know whether we have a real device or a simulator. For a real device, we detect the asic type from the device ID while for a simulator, the simulator code calls create_hdev() with the specified ASIC type. Set ASIC_INVALID as the first option in the enum to make sure that no other enum value will receive the value 0 (which indicates a non-existing entry in the simulator array). Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/habanalabs.h')
-rw-r--r--drivers/misc/habanalabs/habanalabs.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/misc/habanalabs/habanalabs.h b/drivers/misc/habanalabs/habanalabs.h
index 535d4f9531f6..2f02bb55f66a 100644
--- a/drivers/misc/habanalabs/habanalabs.h
+++ b/drivers/misc/habanalabs/habanalabs.h
@@ -390,14 +390,12 @@ struct hl_eq {
/**
* enum hl_asic_type - supported ASIC types.
- * @ASIC_AUTO_DETECT: ASIC type will be automatically set.
- * @ASIC_GOYA: Goya device.
* @ASIC_INVALID: Invalid ASIC type.
+ * @ASIC_GOYA: Goya device.
*/
enum hl_asic_type {
- ASIC_AUTO_DETECT,
- ASIC_GOYA,
- ASIC_INVALID
+ ASIC_INVALID,
+ ASIC_GOYA
};
struct hl_cs_parser;