fix up some small things ffb (no idea if it works or not ..)
parent
55c6e72306
commit
b9c82926bc
|
@ -357,7 +357,7 @@ endif
|
|||
ifneq (,$(findstring mach64,$(DRM_MODULES)))
|
||||
CONFIG_DRM_MACH64 := m
|
||||
endif
|
||||
ifneq (,$($findstring ffb,$(DRM_MODULES)))
|
||||
ifneq (,$(findstring ffb,$(DRM_MODULES)))
|
||||
CONFIG_DRM_FFB := m
|
||||
endif
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
#define DRIVER_MINOR 0
|
||||
#define DRIVER_PATCHLEVEL 1
|
||||
|
||||
#define DRIVER_COUNT_CARDS() ffb_count_card_instances()
|
||||
|
||||
typedef struct _ffb_position_t {
|
||||
int node;
|
||||
int root;
|
||||
|
@ -169,36 +167,6 @@ static int __init ffb_scan_siblings(int root, int instance)
|
|||
return instance;
|
||||
}
|
||||
|
||||
static int ffb_presetup(drm_device_t *);
|
||||
|
||||
static int __init ffb_count_card_instances(void)
|
||||
{
|
||||
int root, total, instance;
|
||||
|
||||
total = ffb_count_siblings(prom_root_node);
|
||||
root = prom_getchild(prom_root_node);
|
||||
for (root = prom_searchsiblings(root, "upa"); root;
|
||||
root = prom_searchsiblings(prom_getsibling(root), "upa"))
|
||||
total += ffb_count_siblings(root);
|
||||
|
||||
ffb_position = kmalloc(sizeof(ffb_position_t) * total, GFP_KERNEL);
|
||||
|
||||
/* Actual failure will be caught during ffb_presetup b/c we can't catch
|
||||
* it easily here.
|
||||
*/
|
||||
if (!ffb_position)
|
||||
return -ENOMEM;
|
||||
|
||||
instance = ffb_scan_siblings(prom_root_node, 0);
|
||||
|
||||
root = prom_getchild(prom_root_node);
|
||||
for (root = prom_searchsiblings(root, "upa"); root;
|
||||
root = prom_searchsiblings(prom_getsibling(root), "upa"))
|
||||
instance = ffb_scan_siblings(root, instance);
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
static drm_map_t *ffb_find_map(struct file *filp, unsigned long off)
|
||||
{
|
||||
drm_file_t *priv = filp->private_data;
|
||||
|
@ -278,7 +246,7 @@ unsigned long ffb_get_unmapped_area(struct file *filp,
|
|||
/* This functions must be here since it references DRM(numdevs)
|
||||
* which drm_drv.h declares.
|
||||
*/
|
||||
static int ffb_presetup(drm_device_t *dev)
|
||||
int ffb_presetup(drm_device_t *dev)
|
||||
{
|
||||
ffb_dev_priv_t *ffb_priv;
|
||||
drm_device_t *temp_dev;
|
||||
|
|
|
@ -357,7 +357,7 @@ endif
|
|||
ifneq (,$(findstring mach64,$(DRM_MODULES)))
|
||||
CONFIG_DRM_MACH64 := m
|
||||
endif
|
||||
ifneq (,$($findstring ffb,$(DRM_MODULES)))
|
||||
ifneq (,$(findstring ffb,$(DRM_MODULES)))
|
||||
CONFIG_DRM_FFB := m
|
||||
endif
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
#define DRIVER_MINOR 0
|
||||
#define DRIVER_PATCHLEVEL 1
|
||||
|
||||
#define DRIVER_COUNT_CARDS() ffb_count_card_instances()
|
||||
|
||||
typedef struct _ffb_position_t {
|
||||
int node;
|
||||
int root;
|
||||
|
@ -169,36 +167,6 @@ static int __init ffb_scan_siblings(int root, int instance)
|
|||
return instance;
|
||||
}
|
||||
|
||||
static int ffb_presetup(drm_device_t *);
|
||||
|
||||
static int __init ffb_count_card_instances(void)
|
||||
{
|
||||
int root, total, instance;
|
||||
|
||||
total = ffb_count_siblings(prom_root_node);
|
||||
root = prom_getchild(prom_root_node);
|
||||
for (root = prom_searchsiblings(root, "upa"); root;
|
||||
root = prom_searchsiblings(prom_getsibling(root), "upa"))
|
||||
total += ffb_count_siblings(root);
|
||||
|
||||
ffb_position = kmalloc(sizeof(ffb_position_t) * total, GFP_KERNEL);
|
||||
|
||||
/* Actual failure will be caught during ffb_presetup b/c we can't catch
|
||||
* it easily here.
|
||||
*/
|
||||
if (!ffb_position)
|
||||
return -ENOMEM;
|
||||
|
||||
instance = ffb_scan_siblings(prom_root_node, 0);
|
||||
|
||||
root = prom_getchild(prom_root_node);
|
||||
for (root = prom_searchsiblings(root, "upa"); root;
|
||||
root = prom_searchsiblings(prom_getsibling(root), "upa"))
|
||||
instance = ffb_scan_siblings(root, instance);
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
static drm_map_t *ffb_find_map(struct file *filp, unsigned long off)
|
||||
{
|
||||
drm_file_t *priv = filp->private_data;
|
||||
|
@ -278,7 +246,7 @@ unsigned long ffb_get_unmapped_area(struct file *filp,
|
|||
/* This functions must be here since it references DRM(numdevs)
|
||||
* which drm_drv.h declares.
|
||||
*/
|
||||
static int ffb_presetup(drm_device_t *dev)
|
||||
int ffb_presetup(drm_device_t *dev)
|
||||
{
|
||||
ffb_dev_priv_t *ffb_priv;
|
||||
drm_device_t *temp_dev;
|
||||
|
|
Loading…
Reference in New Issue