Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1308514
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 5/5] GenWQE: use kobj_to_dev() |
| Date | 2016-01-13 16:40 +0100 |
| Message-ID | <qQvGF-1Gf-9@gated-at.bofh.it> (permalink) |
| References | <qQvGF-1Gf-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use kobj_to_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/misc/genwqe/card_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/genwqe/card_sysfs.c b/drivers/misc/genwqe/card_sysfs.c
index 6ab31ef..c24c9b7 100644
--- a/drivers/misc/genwqe/card_sysfs.c
+++ b/drivers/misc/genwqe/card_sysfs.c
@@ -278,7 +278,7 @@ static umode_t genwqe_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{
unsigned int j;
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct genwqe_dev *cd = dev_get_drvdata(dev);
umode_t mode = attr->mode;
--
2.5.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 5/5] GenWQE: use kobj_to_dev() Geliang Tang <geliangtang@163.com> - 2016-01-13 16:40 +0100
csiph-web