Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6729753 authored by Len Brown's avatar Len Brown
Browse files

Pull pnp into release branch

parents 4548a9db b1734913
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -25,13 +25,13 @@ static const struct pnp_card_device_id *match_card(struct pnp_card_driver *drv,
				int found;
				struct pnp_dev *dev;

				if (i == PNP_MAX_DEVICES
				    || !*drv_id->devs[i].id)
				if (i == PNP_MAX_DEVICES ||
				    !*drv_id->devs[i].id)
					return drv_id;
				found = 0;
				card_for_each_dev(card, dev) {
					if (compare_pnp_id
					    (dev->id, drv_id->devs[i].id)) {
					if (compare_pnp_id(dev->id,
						   drv_id->devs[i].id)) {
						found = 1;
						break;
					}
+1 −6
Original line number Diff line number Diff line
@@ -52,9 +52,6 @@ int pnp_register_protocol(struct pnp_protocol *protocol)
	int nodenum;
	struct list_head *pos;

	if (!protocol)
		return -EINVAL;

	INIT_LIST_HEAD(&protocol->devices);
	INIT_LIST_HEAD(&protocol->cards);
	nodenum = 0;
@@ -94,8 +91,6 @@ static void pnp_free_ids(struct pnp_dev *dev)
	struct pnp_id *id;
	struct pnp_id *next;

	if (!dev)
		return;
	id = dev->id;
	while (id) {
		next = id->next;
@@ -143,7 +138,7 @@ int __pnp_add_device(struct pnp_dev *dev)
 */
int pnp_add_device(struct pnp_dev *dev)
{
	if (!dev || !dev->protocol || dev->card)
	if (dev->card)
		return -EINVAL;
	dev->dev.parent = &dev->protocol->dev;
	sprintf(dev->dev.bus_id, "%02x:%02x", dev->protocol->number,
+1 −5
Original line number Diff line number Diff line
@@ -232,10 +232,6 @@ int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev)
{
	struct pnp_id *ptr;

	if (!id)
		return -EINVAL;
	if (!dev)
		return -EINVAL;
	id->next = NULL;
	ptr = dev->id;
	while (ptr && ptr->next)
+5 −4
Original line number Diff line number Diff line
@@ -459,6 +459,7 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr,
		up(&pnp_res_mutex);
		goto done;
	}

done:
	if (retval < 0)
		return retval;
+7 −17
Original line number Diff line number Diff line
@@ -47,9 +47,6 @@
#if 0
#define ISAPNP_REGION_OK
#endif
#if 0
#define ISAPNP_DEBUG
#endif

int isapnp_disable;		/* Disable ISA PnP */
static int isapnp_rdp;		/* Read Data Port */
@@ -93,7 +90,6 @@ MODULE_LICENSE("GPL");

static unsigned char isapnp_checksum_value;
static DEFINE_MUTEX(isapnp_cfg_mutex);
static int isapnp_detected;
static int isapnp_csn_count;

/* some prototypes */
@@ -940,9 +936,6 @@ EXPORT_SYMBOL(isapnp_protocol);
EXPORT_SYMBOL(isapnp_present);
EXPORT_SYMBOL(isapnp_cfg_begin);
EXPORT_SYMBOL(isapnp_cfg_end);
#if 0
EXPORT_SYMBOL(isapnp_read_byte);
#endif
EXPORT_SYMBOL(isapnp_write_byte);

static int isapnp_read_resources(struct pnp_dev *dev,
@@ -993,6 +986,7 @@ static int isapnp_get_resources(struct pnp_dev *dev,
				struct pnp_resource_table *res)
{
	int ret;

	pnp_init_resource_table(res);
	isapnp_cfg_begin(dev->card->number, dev->number);
	ret = isapnp_read_resources(dev, res);
@@ -1046,7 +1040,7 @@ static int isapnp_set_resources(struct pnp_dev *dev,

static int isapnp_disable_resources(struct pnp_dev *dev)
{
	if (!dev || !dev->active)
	if (!dev->active)
		return -EINVAL;
	isapnp_cfg_begin(dev->card->number, dev->number);
	isapnp_deactivate(dev->number);
@@ -1069,7 +1063,6 @@ static int __init isapnp_init(void)
	struct pnp_dev *dev;

	if (isapnp_disable) {
		isapnp_detected = 0;
		printk(KERN_INFO "isapnp: ISA Plug & Play support disabled\n");
		return 0;
	}
@@ -1117,7 +1110,6 @@ static int __init isapnp_init(void)
		}
		isapnp_set_rdp();
	}
	isapnp_detected = 1;
	if (isapnp_rdp < 0x203 || isapnp_rdp > 0x3ff) {
		cards = isapnp_isolate();
		if (cards < 0 || (isapnp_rdp < 0x203 || isapnp_rdp > 0x3ff)) {
@@ -1125,7 +1117,6 @@ static int __init isapnp_init(void)
			release_region(_PIDXR, 1);
#endif
			release_region(_PNPWRP, 1);
			isapnp_detected = 0;
			printk(KERN_INFO
			       "isapnp: No Plug & Play device found\n");
			return 0;
@@ -1148,13 +1139,12 @@ static int __init isapnp_init(void)
			}
		}
	}
	if (cards) {
	if (cards)
		printk(KERN_INFO
		       "isapnp: %i Plug & Play card%s detected total\n", cards,
		       cards > 1 ? "s" : "");
	} else {
	else
		printk(KERN_INFO "isapnp: No Plug & Play card found\n");
	}

	isapnp_proc_init();
	return 0;
Loading