Thread (17 messages) 17 messages, 6 authors, 2022-02-16

Re: [PATCH v2] extcon: fix extcon_get_extcon_dev() error handling

From: Chanwoo Choi <cw00.choi@samsung.com>
Date: 2021-12-16 08:01:40
Also in: kernel-janitors, linux-omap, linux-pm, lkml

On 12/16/21 4:52 PM, Dan Carpenter wrote:
On Thu, Dec 16, 2021 at 03:39:46PM +0900, Chanwoo Choi wrote:
quoted
Hi Dan,

First of all,  sorry for late reply.

There is one issue. About this issue, I already discussed on patch[1]
[1] https://lore.kernel.org/lkml/5BEB63C3.1020504@samsung.com/ (local) 

extcon_get_extcon_dev() is used for anywhere except for probe step.
But EPROBE_DEFER is only used on probe step.

So that it is not clear to return EPROBE_DEFER from extcon_get_extcon_dev()
because extcon_get_extcon_dev() never know either call it on probe function
or not.
Currently extcon_get_extcon_dev() is only called from probe so it's not
an issue.
Even if extcon_get_extcon_dev() is used on probe until now,
it is possible to use on anywhere as I commented.

It is difficult to agree this approach without any other solution.

Basically, the subsystem core never know either probe time or not.
It means that this issue should be handled in each device driver.

It's impossible to know what future programmers will want, but I feel
like this change probably makes it easier for them.



-- 
Best Regards,
Chanwoo Choi
Samsung Electronics
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help