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

Commit 29bf969f authored by Sarangdhar Joshi's avatar Sarangdhar Joshi
Browse files

coresight: set only required bits in the bitmap



Register value passed to the bitmap_fill was incorrectly setting
unnecessary extra bits in bitmap. Set only required bits in the bitmap.

Change-Id: I00630d1fd0c4ef759f45cd13efa121baa3e4df11
Signed-off-by: default avatarSarangdhar Joshi <spjoshi@codeaurora.org>
parent ee5579b1
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -650,7 +650,7 @@ static const struct attribute_group *tpdm_attr_grps[] = {

static int tpdm_probe(struct platform_device *pdev)
{
	int ret;
	int ret, i;
	uint32_t pidr;
	struct device *dev = &pdev->dev;
	struct coresight_platform_data *pdata;
@@ -698,7 +698,11 @@ static int tpdm_probe(struct platform_device *pdev)

	clk_disable_unprepare(drvdata->clk);

	bitmap_fill(drvdata->datasets, pidr);
	for (i = 0; i < TPDM_DATASETS; i++) {
		if (pidr & BIT(i))
			__set_bit(i, drvdata->datasets);
	}

	if (test_bit(TPDM_DS_CMB, drvdata->datasets)) {
		drvdata->cmb = devm_kzalloc(dev, sizeof(*drvdata->cmb),
					    GFP_KERNEL);