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

Commit 9ead9314 authored by Sean Young's avatar Sean Young Committed by android-build-merger
Browse files

rc: raw decoder for keymap protocol is not loaded on register

am: 39df5977

Change-Id: I01431f5b64836454789cfb846c3a7c99a35cf771
parents 04ab2398 39df5977
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1411,6 +1411,7 @@ int rc_register_device(struct rc_dev *dev)
	int attr = 0;
	int minor;
	int rc;
	u64 rc_type;

	if (!dev || !dev->map_name)
		return -EINVAL;
@@ -1496,14 +1497,18 @@ int rc_register_device(struct rc_dev *dev)
			goto out_input;
	}

	rc_type = BIT_ULL(rc_map->rc_type);

	if (dev->change_protocol) {
		u64 rc_type = (1ll << rc_map->rc_type);
		rc = dev->change_protocol(dev, &rc_type);
		if (rc < 0)
			goto out_raw;
		dev->enabled_protocols = rc_type;
	}

	if (dev->driver_type == RC_DRIVER_IR_RAW)
		ir_raw_load_modules(&rc_type);

	/* Allow the RC sysfs nodes to be accessible */
	atomic_set(&dev->initialized, 1);