Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6584b1ab
Commit
6584b1ab
authored
Sep 04, 2004
by
Dave Airlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove DRIVER_FOPS and related macros
Signed-off-by:
Dave Airlie
<
airlied@linux.ie
>
parent
92910d98
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
49 deletions
+32
-49
drivers/char/drm/drm_drv.h
drivers/char/drm/drm_drv.h
+11
-21
drivers/char/drm/drm_fops.h
drivers/char/drm/drm_fops.h
+0
-4
drivers/char/drm/ffb_context.c
drivers/char/drm/ffb_context.c
+1
-0
drivers/char/drm/ffb_drv.c
drivers/char/drm/ffb_drv.c
+5
-19
drivers/char/drm/ffb_drv.h
drivers/char/drm/ffb_drv.h
+7
-0
drivers/char/drm/gamma.h
drivers/char/drm/gamma.h
+0
-3
drivers/char/drm/gamma_context.h
drivers/char/drm/gamma_context.h
+2
-2
drivers/char/drm/gamma_dma.c
drivers/char/drm/gamma_dma.c
+2
-0
drivers/char/drm/gamma_drv.h
drivers/char/drm/gamma_drv.h
+4
-0
No files found.
drivers/char/drm/drm_drv.h
View file @
6584b1ab
...
...
@@ -76,30 +76,10 @@
#ifndef __HAVE_SG
#define __HAVE_SG 0
#endif
#ifndef __HAVE_DRIVER_FOPS_READ
#define __HAVE_DRIVER_FOPS_READ 0
#endif
#ifndef __HAVE_DRIVER_FOPS_POLL
#define __HAVE_DRIVER_FOPS_POLL 0
#endif
#ifndef DRIVER_IOCTLS
#define DRIVER_IOCTLS
#endif
#ifndef DRIVER_FOPS
#define DRIVER_FOPS \
static struct file_operations DRM(fops) = { \
.owner = THIS_MODULE, \
.open = DRM(open), \
.flush = DRM(flush), \
.release = DRM(release), \
.ioctl = DRM(ioctl), \
.mmap = DRM(mmap), \
.fasync = DRM(fasync), \
.poll = DRM(poll), \
.read = DRM(read), \
}
#endif
#ifndef MODULE
/** Use an additional macro to avoid preprocessor troubles */
...
...
@@ -123,7 +103,17 @@ __setup( DRIVER_NAME "=", DRM_OPTIONS_FUNC );
static
drm_device_t
DRM
(
device
)[
MAX_DEVICES
];
static
int
DRM
(
numdevs
)
=
0
;
DRIVER_FOPS
;
struct
file_operations
DRM
(
fops
)
=
{
.
owner
=
THIS_MODULE
,
.
open
=
DRM
(
open
),
.
flush
=
DRM
(
flush
),
.
release
=
DRM
(
release
),
.
ioctl
=
DRM
(
ioctl
),
.
mmap
=
DRM
(
mmap
),
.
fasync
=
DRM
(
fasync
),
.
poll
=
DRM
(
poll
),
.
read
=
DRM
(
read
),
};
/** Ioctl table */
drm_ioctl_desc_t
DRM
(
ioctls
)[]
=
{
...
...
drivers/char/drm/drm_fops.h
View file @
6584b1ab
...
...
@@ -131,19 +131,15 @@ int DRM(fasync)(int fd, struct file *filp, int on)
return
0
;
}
#if !__HAVE_DRIVER_FOPS_POLL
/** No-op. */
unsigned
int
DRM
(
poll
)(
struct
file
*
filp
,
struct
poll_table_struct
*
wait
)
{
return
0
;
}
#endif
#if !__HAVE_DRIVER_FOPS_READ
/** No-op. */
ssize_t
DRM
(
read
)(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
off
)
{
return
0
;
}
#endif
drivers/char/drm/ffb_context.c
View file @
6584b1ab
...
...
@@ -589,6 +589,7 @@ static int ffb_driver_kernel_context_switch_unlock(struct drm_device *dev)
static
void
ffb_driver_register_fns
(
drm_device_t
*
dev
)
{
DRM
(
fops
).
get_unmapped_area
=
ffb_get_unmapped_area
;
dev
->
fn_tbl
.
release
=
ffb_driver_release
;
dev
->
fn_tbl
.
presetup
=
ffb_driver_presetup
;
dev
->
fn_tbl
.
pretakedown
=
ffb_driver_pretakedown
;
...
...
drivers/char/drm/ffb_drv.c
View file @
6584b1ab
...
...
@@ -26,20 +26,6 @@
#define DRIVER_MINOR 0
#define DRIVER_PATCHLEVEL 1
#define DRIVER_FOPS \
static struct file_operations DRM(fops) = { \
.owner = THIS_MODULE, \
.open = DRM(open), \
.flush = DRM(flush), \
.release = DRM(release), \
.ioctl = DRM(ioctl), \
.mmap = DRM(mmap), \
.read = DRM(read), \
.fasync = DRM(fasync), \
.poll = DRM(poll), \
.get_unmapped_area = ffb_get_unmapped_area, \
}
#define DRIVER_COUNT_CARDS() ffb_count_card_instances()
/* For mmap customization */
...
...
@@ -243,11 +229,11 @@ static drm_map_t *ffb_find_map(struct file *filp, unsigned long off)
return
NULL
;
}
static
unsigned
long
ffb_get_unmapped_area
(
struct
file
*
filp
,
unsigned
long
hint
,
unsigned
long
len
,
unsigned
long
pgoff
,
unsigned
long
flags
)
unsigned
long
ffb_get_unmapped_area
(
struct
file
*
filp
,
unsigned
long
hint
,
unsigned
long
len
,
unsigned
long
pgoff
,
unsigned
long
flags
)
{
drm_map_t
*
map
=
ffb_find_map
(
filp
,
pgoff
<<
PAGE_SHIFT
);
unsigned
long
addr
=
-
ENOMEM
;
...
...
drivers/char/drm/ffb_drv.h
View file @
6584b1ab
...
...
@@ -274,3 +274,10 @@ typedef struct ffb_dev_priv {
/* Context table. */
struct
ffb_hw_context
*
hw_state
[
FFB_MAX_CTXS
];
}
ffb_dev_priv_t
;
extern
struct
file_operations
DRM
(
fops
);
extern
unsigned
long
ffb_get_unmapped_area
(
struct
file
*
filp
,
unsigned
long
hint
,
unsigned
long
len
,
unsigned
long
pgoff
,
unsigned
long
flags
);
drivers/char/drm/gamma.h
View file @
6584b1ab
...
...
@@ -77,9 +77,6 @@
#define __HAVE_OLD_DMA 1
#define __HAVE_PCI_DMA 1
#define __HAVE_DRIVER_FOPS_READ 1
#define __HAVE_DRIVER_FOPS_POLL 1
#define __HAVE_MULTIPLE_DMA_QUEUES 1
#define __HAVE_DMA_WAITQUEUE 1
...
...
drivers/char/drm/gamma_context.h
View file @
6584b1ab
...
...
@@ -42,7 +42,7 @@
the circular buffer), is based on Alessandro Rubini's LINUX DEVICE
DRIVERS (Cambridge: O'Reilly, 1998), pages 111-113. */
ssize_t
DRM
(
read
)
(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
off
)
ssize_t
gamma_fops_read
(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
off
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
dev
;
...
...
@@ -128,7 +128,7 @@ int DRM(write_string)(drm_device_t *dev, const char *s)
return
0
;
}
unsigned
int
DRM
(
poll
)
(
struct
file
*
filp
,
struct
poll_table_struct
*
wait
)
unsigned
int
gamma_fops_poll
(
struct
file
*
filp
,
struct
poll_table_struct
*
wait
)
{
drm_file_t
*
priv
=
filp
->
private_data
;
drm_device_t
*
dev
=
priv
->
dev
;
...
...
drivers/char/drm/gamma_dma.c
View file @
6584b1ab
...
...
@@ -935,6 +935,8 @@ static int gamma_driver_dma_quiescent(drm_device_t *dev)
void
gamma_driver_register_fns
(
drm_device_t
*
dev
)
{
DRM
(
fops
).
read
=
gamma_fops_read
;
DRM
(
fops
).
poll
=
gamma_fops_poll
;
dev
->
fn_tbl
.
preinit
=
gamma_driver_preinit
;
dev
->
fn_tbl
.
pretakedown
=
gamma_driver_pretakedown
;
dev
->
fn_tbl
.
dma_ready
=
gamma_driver_dma_ready
;
...
...
drivers/char/drm/gamma_drv.h
View file @
6584b1ab
...
...
@@ -90,6 +90,10 @@ extern int DRM(freelist_put)(drm_device_t *dev, drm_freelist_t *bl,
drm_buf_t
*
buf
);
extern
drm_buf_t
*
DRM
(
freelist_get
)(
drm_freelist_t
*
bl
,
int
block
);
/* externs for gamma changes to the ops */
extern
struct
file_operations
DRM
(
fops
);
extern
unsigned
int
gamma_fops_poll
(
struct
file
*
filp
,
struct
poll_table_struct
*
wait
);
extern
ssize_t
gamma_fops_read
(
struct
file
*
filp
,
char
__user
*
buf
,
size_t
count
,
loff_t
*
off
);
#define GLINT_DRI_BUF_COUNT 256
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment