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

Commit 803b93e4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Add function stubs for CONFIG_INPUT not set"

parents 3c460521 81a6ba20
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -247,6 +247,7 @@ static void adreno_input_event(struct input_handle *handle, unsigned int type,
		schedule_work(&adreno_dev->input_work);
}

#ifdef CONFIG_INPUT
static int adreno_input_connect(struct input_handler *handler,
		struct input_dev *dev, const struct input_device_id *id)
{
@@ -282,6 +283,14 @@ static void adreno_input_disconnect(struct input_handle *handle)
	input_unregister_handle(handle);
	kfree(handle);
}
#else
static int adreno_input_connect(struct input_handler *handler,
		struct input_dev *dev, const struct input_device_id *id)
{
	return 0;
}
static void adreno_input_disconnect(struct input_handle *handle) {}
#endif

/*
 * We are only interested in EV_ABS events so only register handlers for those
@@ -1579,13 +1588,14 @@ adreno_probe(struct platform_device *pdev)

	adreno_input_handler.private = device;

#ifdef CONFIG_INPUT
	/*
	 * It isn't fatal if we cannot register the input handler.  Sad,
	 * perhaps, but not fatal
	 */
	if (input_register_handler(&adreno_input_handler))
		KGSL_DRV_ERR(device, "Unable to register the input handler\n");

#endif
	return 0;

error_close_device:
@@ -1605,9 +1615,9 @@ static int adreno_remove(struct platform_device *pdev)

	device = (struct kgsl_device *)pdev->id_entry->driver_data;
	adreno_dev = ADRENO_DEVICE(device);

#ifdef CONFIG_INPUT
	input_unregister_handler(&adreno_input_handler);

#endif
	adreno_ft_uninit_sysfs(device);

	adreno_coresight_remove(device);