Use symbols rather than direct numeric values, as suggested by Samuel.
Change-Id: I82ad7714946d4b46e9b396b3b04edccfe415e954
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
#define CATALOG_SIZE ARRAY_SIZE(sensor_catalog)
+/* ACPI PLD (physical location of device) definitions, as used with sensors */
+
+#define PANEL_FRONT 4
+#define PANEL_BACK 5
/* We equate sensor handles to indices in these tables */
if (num_channels < 3)
return;
- if (panel == 5) {
+ if (panel == PANEL_BACK) {
/* Chip placed on the back panel ; negate x and z */
x = -x;
z = -z;
static int is_valid_pld (int panel, int rotation)
{
- if (panel != 4 && panel != 5) { /* 4 = front ; 5 = back */
+ if (panel != PANEL_FRONT && panel != PANEL_BACK) {
ALOGW("Unhandled PLD panel spec: %d\n", panel);
return 0;
}