Commit f2211643 authored by Adam Belay's avatar Adam Belay

[PNP] Remove device naming based on id

This patch removes the pnp name database code.  Most buses, including
pnp, will be using userspace to name devices in the near future.  Also
dev->name will be removed from the driver model soon.
parent 76d0b039
......@@ -20,16 +20,6 @@ config PNP
If unsure, say Y.
config PNP_NAMES
bool "Plug and Play device name database"
depends on PNP
help
Select Y if you want the Plug and Play Layer to keep a database of
human readable names for your PnP devices. It will increase the size
of the kernel image by around 5 KB and use 16 KB of system memory.
If unsure, say Y.
config PNP_DEBUG
bool "PnP Debug Messages"
depends on PNP
......
......@@ -2,7 +2,7 @@
# Makefile for the Linux Plug-and-Play Support.
#
obj-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o names.o system.o
obj-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o system.o
obj-$(CONFIG_PNPBIOS) += pnpbios/
obj-$(CONFIG_ISAPNP) += isapnp/
......@@ -2,7 +2,6 @@ extern struct bus_type pnp_bus_type;
extern spinlock_t pnp_lock;
void *pnp_alloc(long size);
int pnp_interface_attach_device(struct pnp_dev *dev);
void pnp_name_device(struct pnp_dev *dev);
void pnp_fixup_device(struct pnp_dev *dev);
void pnp_free_option(struct pnp_option *option);
int __pnp_add_device(struct pnp_dev *dev);
......
......@@ -113,7 +113,6 @@ static void pnp_release_device(struct device *dmdev)
int __pnp_add_device(struct pnp_dev *dev)
{
int ret;
pnp_name_device(dev);
pnp_fixup_device(dev);
dev->dev.bus = &pnp_bus_type;
dev->dev.release = &pnp_release_device;
......
This diff is collapsed.
/*
* names.c - a very simple name database for PnP devices
*
* Some code is based on names.c from linux pci
* Copyright 1993--1999 Drew Eckhardt, Frederic Potter,
* David Mosberger-Tang, Martin Mares
*
* Copyright 2002 Adam Belay <ambx1@neo.rr.com>
*
*/
#include <linux/string.h>
#include <linux/pnp.h>
#include "base.h"
#ifdef CONFIG_PNP_NAMES
static char *pnp_id_eisaid[] = {
#define ID(x,y) x,
#include "idlist.h"
};
static char *pnp_id_names[] = {
#define ID(x,y) y,
#include "idlist.h"
};
void
pnp_name_device(struct pnp_dev *dev)
{
int i;
char *name = dev->dev.name;
for(i=0; i<sizeof(pnp_id_eisaid)/sizeof(pnp_id_eisaid[0]); i++){
if (compare_pnp_id(dev->id,pnp_id_eisaid[i])){
snprintf(name, DEVICE_NAME_SIZE, "%s", pnp_id_names[i]);
return;
}
}
}
#else
void
pnp_name_device(struct pnp_dev *dev)
{
return;
}
#endif /* CONFIG_PNP_NAMES */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment