All of lore.kernel.org
 help / color / mirror / Atom feed
From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] reset: Make [of_]reset_control_get[_foo] functions wrappers
Date: Fri, 5 Feb 2016 19:30:30 +0100	[thread overview]
Message-ID: <56B4EA46.7060905@redhat.com> (raw)
In-Reply-To: <1454604866.3356.78.camel@pengutronix.de>

Hi,

On 04-02-16 17:54, Philipp Zabel wrote:
> Hi Hans,
>
> Am Mittwoch, den 27.01.2016, 19:15 +0100 schrieb Hans de Goede:
> [...]
>> +/**
>> + * reset_control_get - Lookup and obtain a reference to a reset controller.
>> + * @dev: device to be reset by the controller
>> + * @id: reset line name
>> + *
>> + * Returns a struct reset_control or IS_ERR() condition containing errno.
>> + *
>> + * Use of id names is optional.
>> + */
>> +static inline struct reset_control *__must_check reset_control_get(
>>   					struct device *dev, const char *id)
>>   {
>> -	return ERR_PTR(-ENOTSUPP);
>> +#ifndef CONFIG_RESET_CONTROLLER
>> +	WARN_ON(1);
>> +#endif
>> +	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0);
>
> Even though we are device tree only at this point, I'd prefer to keep an
> exported function that takes a struct device argument, for example:
>
> 	return __reset_control_get(dev, id, 0);

I don't really see a reason to do this, this is not userspace abi or some-such
we can always later re-introduce an exported function which takes a device
argument. But if you insist, you're the boss :)  Let me know if you really
want me to make this change for the next version, and I'll add it to v4 of this
set.

Regards,

Hans

  reply	other threads:[~2016-02-05 18:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 18:15 [PATCH v3 0/3] reset: Add support for shared reset controls Hans de Goede
2016-01-27 18:15 ` [PATCH v3 1/3] reset: Make [of_]reset_control_get[_foo] functions wrappers Hans de Goede
2016-02-04 16:54   ` Philipp Zabel
2016-02-05 18:30     ` Hans de Goede [this message]
2016-02-08  9:58       ` Philipp Zabel
2016-01-27 18:15 ` [PATCH v3 2/3] reset: Share struct reset_control between reset_control_get calls Hans de Goede
2016-01-27 18:15 ` [PATCH v3 3/3] reset: Add support for shared reset controls Hans de Goede
2016-01-28 20:20   ` Stephen Warren
2016-01-29  6:18     ` Hans de Goede
2016-01-29 16:21       ` Stephen Warren
2016-01-30 11:38   ` Philipp Zabel
2016-01-31  9:12     ` Hans de Goede
2016-02-04 16:55       ` Philipp Zabel
2016-02-05  9:08   ` Philipp Zabel
2016-02-05 18:28     ` Hans de Goede

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=56B4EA46.7060905@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.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.