105b261ecSmrg/*
205b261ecSmrg * Copyright (c) 2000-2002 by The XFree86 Project, Inc.
305b261ecSmrg *
405b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining a
505b261ecSmrg * copy of this software and associated documentation files (the "Software"),
605b261ecSmrg * to deal in the Software without restriction, including without limitation
705b261ecSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
805b261ecSmrg * and/or sell copies of the Software, and to permit persons to whom the
905b261ecSmrg * Software is furnished to do so, subject to the following conditions:
1005b261ecSmrg *
1105b261ecSmrg * The above copyright notice and this permission notice shall be included in
1205b261ecSmrg * all copies or substantial portions of the Software.
1305b261ecSmrg *
1405b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1505b261ecSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1605b261ecSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1705b261ecSmrg * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
1805b261ecSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1905b261ecSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2005b261ecSmrg * OTHER DEALINGS IN THE SOFTWARE.
2105b261ecSmrg *
2205b261ecSmrg * Except as contained in this notice, the name of the copyright holder(s)
2305b261ecSmrg * and author(s) shall not be used in advertising or otherwise to promote
2405b261ecSmrg * the sale, use or other dealings in this Software without prior written
2505b261ecSmrg * authorization from the copyright holder(s) and author(s).
2605b261ecSmrg */
2705b261ecSmrg
2805b261ecSmrg/*
2905b261ecSmrg * This file contains the interfaces to the bus-specific code
3005b261ecSmrg */
3105b261ecSmrg
3205b261ecSmrg#ifdef HAVE_XORG_CONFIG_H
3305b261ecSmrg#include <xorg-config.h>
3405b261ecSmrg#endif
3505b261ecSmrg
3605b261ecSmrg#include <ctype.h>
3705b261ecSmrg#include <stdlib.h>
3805b261ecSmrg#include <unistd.h>
3905b261ecSmrg#include <X11/X.h>
4005b261ecSmrg#include "os.h"
4105b261ecSmrg#include "xf86.h"
4205b261ecSmrg#include "xf86Priv.h"
4305b261ecSmrg
4405b261ecSmrg#include "xf86Bus.h"
4505b261ecSmrg
4605b261ecSmrg#define XF86_OS_PRIVS
4705b261ecSmrg#include "xf86_OSproc.h"
4805b261ecSmrg
496747b715Smrgint
5005b261ecSmrgxf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
5105b261ecSmrg{
5205b261ecSmrg    EntityPtr p;
5305b261ecSmrg    int num;
5435c4bbdfSmrg
5505b261ecSmrg    num = xf86AllocateEntity();
5605b261ecSmrg    p = xf86Entities[num];
5705b261ecSmrg    p->driver = drvp;
5805b261ecSmrg    p->chipset = 0;
596747b715Smrg    p->bus.type = BUS_NONE;
6005b261ecSmrg    p->active = active;
6105b261ecSmrg    p->inUse = FALSE;
6205b261ecSmrg    xf86AddDevToEntity(num, dev);
6305b261ecSmrg
6405b261ecSmrg    return num;
6505b261ecSmrg}
66