From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 03/10] cio: Use to_channelpath() for device to channel path conversion.
Date: Fri, 19 Oct 2007 19:19:00 +0200 [thread overview]
Message-ID: <20071019171944.327229924@de.ibm.com> (raw)
In-Reply-To: 20071019171857.430999834@de.ibm.com
[-- Attachment #1: 003-cio-channelpath.diff --]
[-- Type: text/plain, Size: 2249 bytes --]
From: Cornelia Huck <cornelia.huck@de.ibm.com>
We already have a macro for that, so let's use it consistently...
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
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.
next prev parent reply other threads:[~2007-10-19 17:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 17:18 [patch 00/10] 2nd batch of s390 patches for 2.6.24 Martin Schwidefsky
2007-10-19 17:18 ` [patch 01/10] Update default configuration Martin Schwidefsky
2007-10-19 17:18 ` [patch 02/10] Add per-cpu idle time / idle count sysfs attributes Martin Schwidefsky
2007-10-19 17:19 ` Martin Schwidefsky [this message]
2007-10-19 17:19 ` [patch 04/10] cio: Fix incomplete commit for uevent suppression Martin Schwidefsky
2007-10-19 17:19 ` [patch 05/10] struct class_device -> struct device conversion Martin Schwidefsky
2007-10-19 17:19 ` [patch 06/10] tlb flush fix Martin Schwidefsky
2007-10-19 17:19 ` [patch 07/10] Remove unused user_seg from thread structure Martin Schwidefsky
2007-10-19 17:19 ` [patch 08/10] Introduce follow_table in uaccess_pt.c Martin Schwidefsky
2007-10-19 17:19 ` [patch 09/10] Cleanup page table definitions Martin Schwidefsky
2007-10-19 17:19 ` [patch 10/10] 4level-fixup cleanup Martin Schwidefsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071019171944.327229924@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.