Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd9f329b authored by Steve Cohen's avatar Steve Cohen
Browse files

disp: msm: sde: set prop_count for U32 and BOOL type device node props



Set the prop_count corresponding to unsigned 32-bit integers and
boolean types to 1. With this change prop_count should have a
positive value for all properties which exist under the device node.

Change-Id: I601870dc25ab347b742fcc4aa2f6bea2397c6caf
Signed-off-by: default avatarSteve Cohen <cohens@codeaurora.org>
parent 9beffdfd
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -912,6 +912,8 @@ static int _validate_dt_entry(struct device_node *np,
		case PROP_TYPE_U32:
			rc = of_property_read_u32(np, sde_prop[i].prop_name,
				&val);
			if (!rc)
				prop_count[i] = 1;
			break;
		case PROP_TYPE_U32_ARRAY:
			prop_count[i] = of_property_count_u32_elems(np,
@@ -935,6 +937,14 @@ static int _validate_dt_entry(struct device_node *np,
			if (!snp)
				rc = -EINVAL;
			break;
		case PROP_TYPE_BOOL:
			/**
			 * No special handling for bool properties here.
			 * They will always exist, with value indicating
			 * if the given key is present or not.
			 */
			prop_count[i] = 1;
			break;
		default:
			SDE_DEBUG("invalid property type:%d\n",
							sde_prop[i].type);