lkml.org 
[lkml]   [2022]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 3/3] drm: add dedicated minor for accelerator devices
On Sun, Oct 23, 2022 at 12:46:22AM +0300, Oded Gabbay wrote:
> +/**
> + * accel_open - open method for ACCEL file
> + * @inode: device inode
> + * @filp: file pointer.
> + *
> + * This function must be used by drivers as their &file_operations.open method.
> + * It looks up the correct ACCEL device and instantiates all the per-file
> + * resources for it. It also calls the &drm_driver.open driver callback.
> + *
> + * RETURNS:
> + *
> + * 0 on success or negative errno value on failure.
> + */
> +int accel_open(struct inode *inode, struct file *filp)
> +{
> + struct drm_minor *minor;
> +
> + minor = drm_minor_acquire(iminor(inode), true);
> + if (IS_ERR(minor))
> + return PTR_ERR(minor);
> +
> + return __drm_open(inode, filp, minor);
> +}
> +EXPORT_SYMBOL(accel_open);

EXPORT_SYMBOL_GPL() please.

And again, this should probably to into drivers/accel/ not here.

thanks,

greg k-h

\
 
 \ /
  Last update: 2022-10-23 14:42    [W:0.198 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site