From: Trilok Soni <soni.trilok@gmail.com>
To: Kay Sievers <kay.sievers@vrfy.org>, Kyungmin Park <kmpark@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
Greg Kroah-Hartmann <greg@kroah.com>
Subject: Re: [PATCH] Haptic class support (v2)
Date: Tue, 20 Oct 2009 12:14:46 +0530 [thread overview]
Message-ID: <5d5443650910192344v5c396033g55ad8cd85370dbb4@mail.gmail.com> (raw)
In-Reply-To: <ac3eb2510910130945w2e87d84bjfa3291989d85375b@mail.gmail.com>
Hi Kyungmin,
On Tue, Oct 13, 2009 at 10:15 PM, Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Tue, Oct 6, 2009 at 09:45, Kyungmin Park <kmpark@infradead.org> wrote:
>
>> +/**
>> + * haptic_classdev_register - register a new object of haptic_classdev class.
>> + * @dev: The device to register.
>> + * @haptic_cdev: the haptic_classdev structure for this device.
>> + */
>> +int haptic_classdev_register(struct device *parent,
>> + struct haptic_classdev *haptic_cdev)
>> +{
>> + int ret;
>> +
>> + haptic_cdev->dev = device_create(haptic_class, parent, 0,
>> + haptic_cdev, "%s", haptic_cdev->name);
>> + if (IS_ERR(haptic_cdev->dev))
>> + return PTR_ERR(haptic_cdev->dev);
>> +
>> + /* register the attributes */
>> + ret = class_create_file(haptic_class, &class_attr_enable);
>> + if (ret) {
>> + printk(KERN_ERR "%s: class_create_file(enable) failed\n",
>> + __func__);
>> + return ret;
>> + }
>
> As mentioned in an earlier mail, this needs some explanation. What are
> you doing here? Creating a device below a class, and then add a bunch
> of attributes to the class itself, instead of the device you created?
>
> All calls to class_create_file() need to go, we can not allow any new
> users of this broken interface. As mentioned, if you need
> subsystem-wide attributes you need to use a bus and not a class,
> classes are flat and can not handle such things properly.
>
> Thanks,
> Kay
>
Any plan of refreshing these patches?
--
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni
prev parent reply other threads:[~2009-10-20 6:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 7:45 Kyungmin Park
2009-10-06 15:25 ` Randy Dunlap
2009-10-06 18:35 ` Trilok Soni
2009-10-07 5:13 ` Kyungmin Park
2009-10-11 9:05 ` Pavel Machek
2009-10-12 0:32 ` Kyungmin Park
2009-10-12 13:44 ` Trilok Soni
2009-10-12 14:40 ` Greg KH
2009-10-13 11:05 ` Pavel Machek
2009-10-12 15:42 ` Kay Sievers
2009-10-12 16:20 ` Mark Brown
2009-10-13 16:45 ` Kay Sievers
2009-10-20 6:44 ` Trilok Soni [this message]
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=5d5443650910192344v5c396033g55ad8cd85370dbb4@mail.gmail.com \
--to=soni.trilok@gmail.com \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=kmpark@infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®