Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762392AbYCZRRQ (ORCPT ); Wed, 26 Mar 2008 13:17:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758106AbYCZRJX (ORCPT ); Wed, 26 Mar 2008 13:09:23 -0400 Received: from g1t0027.austin.hp.com ([15.216.28.34]:22098 "EHLO g1t0027.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760513AbYCZRI5 (ORCPT ); Wed, 26 Mar 2008 13:08:57 -0400 Message-Id: <20080326171227.131971545@ldl.fc.hp.com> References: <20080326171058.099442579@ldl.fc.hp.com> User-Agent: quilt/0.46-1 Date: Wed, 26 Mar 2008 11:11:17 -0600 From: Bjorn Helgaas To: Len Brown Cc: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Adam Belay Cc: Li Shaohua Cc: Matthieu Castet Cc: Thomas Renninger Cc: Rene Herman Cc: Jaroslav Kysela Cc: Andrew Morton Subject: [patch 19/37] PNP: remove pnp_resource_table from internal pnp_clean_resource_table interface Content-Disposition: inline; filename=pnp-remove-pnp_resource_table-from-clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1783 Lines: 56 This changes pnp_clean_resource_table() to take a pnp_dev pointer rather than a pnp_resource_table pointer. This reduces the visibility of pnp_resource_table and removes an opportunity for error in the caller. Signed-off-by: Bjorn Helgaas Index: work7/drivers/pnp/manager.c =================================================================== --- work7.orig/drivers/pnp/manager.c 2008-03-25 11:03:59.000000000 -0600 +++ work7/drivers/pnp/manager.c 2008-03-25 11:04:52.000000000 -0600 @@ -247,8 +247,9 @@ * pnp_clean_resources - clears resources that were not manually set * @res: the resources to clean */ -static void pnp_clean_resource_table(struct pnp_resource_table *res) +static void pnp_clean_resource_table(struct pnp_dev *dev) { + struct pnp_resource_table *res = &dev->res; int idx; for (idx = 0; idx < PNP_MAX_IRQ; idx++) { @@ -304,7 +305,7 @@ return -ENODEV; mutex_lock(&pnp_res_mutex); - pnp_clean_resource_table(&dev->res); /* start with a fresh slate */ + pnp_clean_resource_table(dev); if (dev->independent) { port = dev->independent->port; mem = dev->independent->mem; @@ -376,7 +377,7 @@ return 1; fail: - pnp_clean_resource_table(&dev->res); + pnp_clean_resource_table(dev); mutex_unlock(&pnp_res_mutex); return 0; } @@ -554,7 +555,7 @@ /* release the resources so that other devices can use them */ mutex_lock(&pnp_res_mutex); - pnp_clean_resource_table(&dev->res); + pnp_clean_resource_table(dev); mutex_unlock(&pnp_res_mutex); return 0; -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/