search for: file_operations

Displaying 20 results from an estimated 561 matches for "file_operations".

2007 Mar 05
0
[PATCH 3/10] linux 2.6.18: constify instances of ''struct file_operations''
...: head-2007-02-27/drivers/char/mem.c =================================================================== --- head-2007-02-27.orig/drivers/char/mem.c 2007-03-05 10:00:18.000000000 +0100 +++ head-2007-02-27/drivers/char/mem.c 2007-02-27 16:27:37.000000000 +0100 @@ -787,7 +787,7 @@ static const struct file_operations mem_ .open = open_mem, }; #else -extern struct file_operations mem_fops; +extern const struct file_operations mem_fops; #endif static const struct file_operations kmem_fops = { Index: head-2007-02-27/drivers/xen/blktap/blktap.c ==============================================================...
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...pp_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int pp_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = { .write = pp_write, .poll = pp_poll, .unlocked_ioctl = pp_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = pp_compat_ioctl, -#endif + .compat_ioctl = compat_ptr_ioctl, .open = pp_open, .release = pp_release, }; diff --git a/drivers/char/tpm/tpm_vtpm_proxy.c b/drivers/char...
2019 Apr 16
4
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...pp_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int pp_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = { .write = pp_write, .poll = pp_poll, .unlocked_ioctl = pp_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = pp_compat_ioctl, -#endif + .compat_ioctl = compat_ptr_ioctl, .open = pp_open, .release = pp_release, }; diff --git a/drivers/char/tpm/tpm_vtpm_proxy.c b/drivers/char...
2019 Apr 19
0
[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl
...md, > - unsigned long arg) > -{ > - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); > -} > -#endif > - > static int pp_open(struct inode *inode, struct file *file) > { > unsigned int minor = iminor(inode); > @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = { > .write = pp_write, > .poll = pp_poll, > .unlocked_ioctl = pp_ioctl, > -#ifdef CONFIG_COMPAT > - .compat_ioctl = pp_compat_ioctl, > -#endif > + .compat_ioctl = compat_ptr_ioctl, > .open = pp_open, > .release = pp_release, > }; > diff -...
2018 Sep 12
1
[PATCH v2 02/17] compat_ioctl: move drivers to generic_compat_ioctl_ptrarg
...pp_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int pp_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -790,9 +782,7 @@ static const struct file_operations pp_fops = { .write = pp_write, .poll = pp_poll, .unlocked_ioctl = pp_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = pp_compat_ioctl, -#endif + .compat_ioctl = generic_compat_ioctl_ptrarg, .open = pp_open, .release = pp_release, }; diff --git a/drivers/char/tpm/tpm_vtpm_proxy.c b/d...
2019 Jul 30
2
[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl
...pp_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - return pp_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); -} -#endif - static int pp_open(struct inode *inode, struct file *file) { unsigned int minor = iminor(inode); @@ -786,9 +778,7 @@ static const struct file_operations pp_fops = { .write = pp_write, .poll = pp_poll, .unlocked_ioctl = pp_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = pp_compat_ioctl, -#endif + .compat_ioctl = compat_ptr_ioctl, .open = pp_open, .release = pp_release, }; diff --git a/drivers/char/tpm/tpm_vtpm_proxy.c b/drivers/char...
2019 Sep 13
2
[PATCH 8/8] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...--- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -180,22 +180,4 @@ struct drm_vram_mm *drm_vram_helper_alloc_mm( struct drm_device *dev, uint64_t vram_base, size_t vram_size); void drm_vram_helper_release_mm(struct drm_device *dev); -/** - * define DRM_VRAM_MM_FILE_OPERATIONS - default callback functions for \ - &struct file_operations - * - * Drivers that use VRAM MM can use this macro to initialize - * &struct file_operations with default functions. - */ -#define DRM_VRAM_MM_FILE_OPERATIONS \ - .llseek = no_llseek, \ - .read = drm_read, \ - .poll = drm_poll...
2019 Sep 13
2
[PATCH 8/8] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...--- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -180,22 +180,4 @@ struct drm_vram_mm *drm_vram_helper_alloc_mm( struct drm_device *dev, uint64_t vram_base, size_t vram_size); void drm_vram_helper_release_mm(struct drm_device *dev); -/** - * define DRM_VRAM_MM_FILE_OPERATIONS - default callback functions for \ - &struct file_operations - * - * Drivers that use VRAM MM can use this macro to initialize - * &struct file_operations with default functions. - */ -#define DRM_VRAM_MM_FILE_OPERATIONS \ - .llseek = no_llseek, \ - .read = drm_read, \ - .poll = drm_poll...
2019 Aug 08
0
[PATCH v4 12/17] drm: drop DRM_VRAM_MM_FILE_OPERATIONS
...8ad37..59a8a7657a5b 100644 --- a/include/drm/drm_vram_mm_helper.h +++ b/include/drm/drm_vram_mm_helper.h @@ -74,21 +74,4 @@ struct drm_vram_mm *drm_vram_helper_alloc_mm( const struct drm_vram_mm_funcs *funcs); void drm_vram_helper_release_mm(struct drm_device *dev); -/** - * define DRM_VRAM_MM_FILE_OPERATIONS - default callback functions for \ - &struct file_operations - * - * Drivers that use VRAM MM can use this macro to initialize - * &struct file_operations with default functions. - */ -#define DRM_VRAM_MM_FILE_OPERATIONS \ - .llseek = no_llseek, \ - .read = drm_read, \ - .poll = drm_poll...
2019 Oct 16
0
[PATCH v4 11/11] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...--- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -184,22 +184,4 @@ struct drm_vram_mm *drm_vram_helper_alloc_mm( struct drm_device *dev, uint64_t vram_base, size_t vram_size); void drm_vram_helper_release_mm(struct drm_device *dev); -/** - * define DRM_VRAM_MM_FILE_OPERATIONS - default callback functions for \ - &struct file_operations - * - * Drivers that use VRAM MM can use this macro to initialize - * &struct file_operations with default functions. - */ -#define DRM_VRAM_MM_FILE_OPERATIONS \ - .llseek = no_llseek, \ - .read = drm_read, \ - .poll = drm_poll...
2019 Sep 17
0
[PATCH v2 11/11] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...--- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -180,22 +180,4 @@ struct drm_vram_mm *drm_vram_helper_alloc_mm( struct drm_device *dev, uint64_t vram_base, size_t vram_size); void drm_vram_helper_release_mm(struct drm_device *dev); -/** - * define DRM_VRAM_MM_FILE_OPERATIONS - default callback functions for \ - &struct file_operations - * - * Drivers that use VRAM MM can use this macro to initialize - * &struct file_operations with default functions. - */ -#define DRM_VRAM_MM_FILE_OPERATIONS \ - .llseek = no_llseek, \ - .read = drm_read, \ - .poll = drm_poll...
2019 Sep 19
0
[PATCH v3 11/11] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...--- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -183,22 +183,4 @@ struct drm_vram_mm *drm_vram_helper_alloc_mm( struct drm_device *dev, uint64_t vram_base, size_t vram_size); void drm_vram_helper_release_mm(struct drm_device *dev); -/** - * define DRM_VRAM_MM_FILE_OPERATIONS - default callback functions for \ - &struct file_operations - * - * Drivers that use VRAM MM can use this macro to initialize - * &struct file_operations with default functions. - */ -#define DRM_VRAM_MM_FILE_OPERATIONS \ - .llseek = no_llseek, \ - .read = drm_read, \ - .poll = drm_poll...
2020 Feb 25
1
[PATCH 1/3] drm: Add separate state structure for legacy, non-KMS drivers
...t); > dev->driver = driver; > diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c > index 0e53a066d4db..55f17f00bae9 100644 > --- a/drivers/gpu/drm/i810/i810_drv.c > +++ b/drivers/gpu/drm/i810/i810_drv.c > @@ -56,6 +56,9 @@ static const struct file_operations i810_driver_fops = { > .llseek = noop_llseek, > }; > > +static struct drm_legacy_state = i810_legacy_state { Does this compile? I might have assumed this would need to be static struct drm_legacy_state i810_legacy_state = { > +}; > + > static struct drm_driver driv...
2019 Sep 13
0
[PATCH 8/8] drm/vram: drop DRM_VRAM_MM_FILE_OPERATIONS
...er.h > +++ b/include/drm/drm_gem_vram_helper.h > @@ -180,22 +180,4 @@ struct drm_vram_mm *drm_vram_helper_alloc_mm( > struct drm_device *dev, uint64_t vram_base, size_t vram_size); > void drm_vram_helper_release_mm(struct drm_device *dev); > > -/** > - * define DRM_VRAM_MM_FILE_OPERATIONS - default callback functions for \ > - &struct file_operations > - * > - * Drivers that use VRAM MM can use this macro to initialize > - * &struct file_operations with default functions. > - */ > -#define DRM_VRAM_MM_FILE_OPERATIONS \ > - .llseek = no_llseek, \ > -...
2020 Feb 25
0
[PATCH 1/3] drm: Add separate state structure for legacy, non-KMS drivers
...f); dev->dev = get_device(parent); dev->driver = driver; diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c index 0e53a066d4db..55f17f00bae9 100644 --- a/drivers/gpu/drm/i810/i810_drv.c +++ b/drivers/gpu/drm/i810/i810_drv.c @@ -56,6 +56,9 @@ static const struct file_operations i810_driver_fops = { .llseek = noop_llseek, }; +static struct drm_legacy_state = i810_legacy_state { +}; + static struct drm_driver driver = { .driver_features = DRIVER_USE_AGP | DRIVER_HAVE_DMA | DRIVER_LEGACY, .dev_priv_size = sizeof(drm_i810_buf_priv_t), @@ -71,6 +74,7 @@ static struct...
2017 Aug 11
2
[Gluster-devel] How commonly applications make use of fadvise?
...che > behavior and is decoupled from the filesystem itself. What this means for > fuse is that the 'advise' is only to the content that the fuse kernel > module has stored in that machine's page cache. Exposing it as a FOP would > likely involve adding a new fop to struct file_operations that is common > across the entire VFS and likely won't fly with the kernel folks. I could > be wrong in understanding all of this. :-) Thanks for checking! If that is the case, we need a good use-case to add a fadvise function pointer to the file_operations. It is not impossible to con...
2020 Feb 25
7
[PATCH 0/3] Add separate non-KMS state; constify struct drm_driver
This patchset moves legacy, non-KMS driver state from struct drm_driver into struct drm_legacy_state. Only non-KMS drivers provide an instance of the latter structure. One special case is nouveau, which supports legacy interfaces. It also provides an instance of the legacy state if the legacy interfaces have been enabled (i.e., defines the config option CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT) I
2016 Mar 21
0
[PATCH v2 22/22] debugfs: add boost interface to change the boost_mode
...76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/drm/nouveau/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c index 3d0dc19..31b309f 100644 --- a/drm/nouveau/nouveau_debugfs.c +++ b/drm/nouveau/nouveau_debugfs.c @@ -180,6 +180,81 @@ static const struct file_operations nouveau_pstate_fops = { .write = nouveau_debugfs_pstate_set, }; +static void +nouveau_debugfs_boost_get_entry(struct seq_file *m, u8 mode, u8 entry, u16 value) +{ + if (value) { + if (mode == entry) + seq_printf(m, "*%i", entry); + else + seq_printf(m, " %i", entry);...
2015 Sep 09
2
[PATCH 5/5] virtgpu: mark as a render gpu
...| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index 1245d09..e00298e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -113,7 +113,7 @@ static const struct file_operations virtio_gpu_driver_fops = { static struct drm_driver driver = { - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME, + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER, .set_busid = drm_virtio_set_busid, .load = virtio_gpu_driver_load, .unload = vi...
2015 Sep 09
2
[PATCH 5/5] virtgpu: mark as a render gpu
...| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index 1245d09..e00298e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -113,7 +113,7 @@ static const struct file_operations virtio_gpu_driver_fops = { static struct drm_driver driver = { - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME, + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER, .set_busid = drm_virtio_set_busid, .load = virtio_gpu_driver_load, .unload = vi...