Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934715AbXJSRWb (ORCPT ); Fri, 19 Oct 2007 13:22:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933662AbXJSRUA (ORCPT ); Fri, 19 Oct 2007 13:20:00 -0400 Received: from mtagate2.de.ibm.com ([195.212.29.151]:11776 "EHLO mtagate2.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763044AbXJSRTs (ORCPT ); Fri, 19 Oct 2007 13:19:48 -0400 Message-Id: <20071019171944.327229924@de.ibm.com> References: <20071019171857.430999834@de.ibm.com> User-Agent: quilt/0.46-1 Date: Fri, 19 Oct 2007 19:19:00 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Cornelia Huck , Martin Schwidefsky Subject: [patch 03/10] cio: Use to_channelpath() for device to channel path conversion. Content-Disposition: inline; filename=003-cio-channelpath.diff Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2494 Lines: 81 From: Cornelia Huck We already have a macro for that, so let's use it consistently... Signed-off-by: Cornelia Huck Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/chp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) Index: quilt-2.6/drivers/s390/cio/chp.c =================================================================== --- quilt-2.6.orig/drivers/s390/cio/chp.c +++ quilt-2.6/drivers/s390/cio/chp.c @@ -246,7 +246,7 @@ int chp_add_cmg_attr(struct channel_path static ssize_t chp_status_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct channel_path *chp = container_of(dev, struct channel_path, dev); + struct channel_path *chp = to_channelpath(dev); if (!chp) return 0; @@ -258,7 +258,7 @@ static ssize_t chp_status_write(struct d struct device_attribute *attr, const char *buf, size_t count) { - struct channel_path *cp = container_of(dev, struct channel_path, dev); + struct channel_path *cp = to_channelpath(dev); char cmd[10]; int num_args; int error; @@ -286,7 +286,7 @@ static ssize_t chp_configure_show(struct struct channel_path *cp; int status; - cp = container_of(dev, struct channel_path, dev); + cp = to_channelpath(dev); status = chp_info_get_status(cp->chpid); if (status < 0) return status; @@ -308,7 +308,7 @@ static ssize_t chp_configure_write(struc return -EINVAL; if (val != 0 && val != 1) return -EINVAL; - cp = container_of(dev, struct channel_path, dev); + cp = to_channelpath(dev); chp_cfg_schedule(cp->chpid, val); cfg_wait_idle(); @@ -320,7 +320,7 @@ static DEVICE_ATTR(configure, 0644, chp_ static ssize_t chp_type_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct channel_path *chp = container_of(dev, struct channel_path, dev); + struct channel_path *chp = to_channelpath(dev); if (!chp) return 0; @@ -374,7 +374,7 @@ static void chp_release(struct device *d { struct channel_path *cp; - cp = container_of(dev, struct channel_path, dev); + cp = to_channelpath(dev); kfree(cp); } -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. - 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/