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

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

Merge "ion: Remove custom compat framework"

parents 5292f264 63ca90df
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -61,9 +61,6 @@ struct ion_device {
	struct plist_head heaps;
	long (*custom_ioctl) (struct ion_client *client, unsigned int cmd,
			      unsigned long arg);
	long (*custom_compat_ioctl) (struct ion_client *client,
			      unsigned int cmd,
			      unsigned long arg);
	struct rb_root clients;
	struct dentry *debug_root;
	struct dentry *heaps_debug_root;
@@ -1443,11 +1440,6 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
	{
		if (!dev->custom_ioctl)
			return -ENOTTY;

		if (dev->custom_compat_ioctl)
			ret = dev->custom_compat_ioctl(client, data.custom.cmd,
						data.custom.arg);
		else
		ret = dev->custom_ioctl(client, data.custom.cmd,
						data.custom.arg);
		break;
@@ -1813,10 +1805,6 @@ int ion_walk_heaps(struct ion_client *client, int heap_id, void *data,
EXPORT_SYMBOL(ion_walk_heaps);

struct ion_device *ion_device_create(long (*custom_ioctl)
				     (struct ion_client *client,
				      unsigned int cmd,
				      unsigned long arg),
				  long (*custom_compat_ioctl)
				     (struct ion_client *client,
				      unsigned int cmd,
				      unsigned long arg))
@@ -1856,7 +1844,6 @@ struct ion_device *ion_device_create(long (*custom_ioctl)
debugfs_done:

	idev->custom_ioctl = custom_ioctl;
	idev->custom_compat_ioctl = custom_compat_ioctl;
	idev->buffers = RB_ROOT;
	mutex_init(&idev->buffer_lock);
	init_rwsem(&idev->lock);
+1 −7
Original line number Diff line number Diff line
@@ -200,19 +200,13 @@ bool ion_buffer_fault_user_mappings(struct ion_buffer *buffer);
/**
 * ion_device_create - allocates and returns an ion device
 * @custom_ioctl:	arch specific ioctl function if applicable
 * @custom_comat_ioctl:	arch specific compat_ioctl function if applicable
 *
 * returns a valid device or -PTR_ERR
 */
struct ion_device *ion_device_create(long (*custom_ioctl)
				     (struct ion_client *client,
				      unsigned int cmd,
				      unsigned long arg),
				    long (*custom_compat_ioctl)
				     (struct ion_client *client,
				      unsigned int cmd,
				      unsigned long arg)
);
				      unsigned long arg));

/**
 * ion_device_destroy - free and device and it's resource
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ long compat_msm_ion_ioctl(struct ion_client *client, unsigned int cmd,

#else

#define compat_msm_ion_ioctl  NULL
#define compat_msm_ion_ioctl  msm_ion_custom_ioctl

#endif
#endif
+1 −1
Original line number Diff line number Diff line
@@ -879,7 +879,7 @@ static int msm_ion_probe(struct platform_device *pdev)
		goto out;
	}

	new_dev = ion_device_create(msm_ion_custom_ioctl, compat_msm_ion_ioctl);
	new_dev = ion_device_create(compat_msm_ion_ioctl);
	if (IS_ERR_OR_NULL(new_dev)) {
		/*
		 * set this to the ERR to indicate to the clients
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ int tegra_ion_probe(struct platform_device *pdev)

	heaps = kzalloc(sizeof(struct ion_heap *) * pdata->nr, GFP_KERNEL);

	idev = ion_device_create(NULL, NULL);
	idev = ion_device_create(NULL);
	if (IS_ERR_OR_NULL(idev)) {
		kfree(heaps);
		return PTR_ERR(idev);