Skip to contentSkip to conversation

Is platform_device_register_simple() deprecated?

DISCUSSION Rene Herman 4 participants 7 messages Apr 12, 2006 – Apr 13, 2006

lore
Share & tools
lore
#1 lore raw
Quoted 9 lines · Rene Herman

Hi Greg, Russel, Dmitry.

ALSA is using platform_device_register_simple(). Jean Delvare pointed:

http://marc.theaimsgroup.com/?l=linux-kernel&m=113398060508534&w=2

out, where _simple looks to be slated for removal. Is this indeed the case? ALSA isn't using the resources -- doing a manual alloc/add would not be a problem...

It would be good to remove the old (restricted) API - I'm of the opinion that having too many interfaces just adds extra maintainence burden, so we should strive to ensure that old APIs are deprecated and removed in a timely fashion.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#2 lore raw
In reply to Rene Herman
Quoted 9 lines · Rene Herman

Hi Greg, Russel, Dmitry.

ALSA is using platform_device_register_simple(). Jean Delvare pointed:

http://marc.theaimsgroup.com/?l=linux-kernel&m=113398060508534&w=2

out, where _simple looks to be slated for removal. Is this indeed the case? ALSA isn't using the resources -- doing a manual alloc/add would not be a problem...

Great, care to convert ALSA to use the proper api so we can remove platform_device_register_simple()?

thanks,

greg k-h

#3 lore raw
Quoted 5 lines · Greg KH
Quoted 4 lines · Rene Herman

Hi Greg, Russel, Dmitry.

ALSA is using platform_device_register_simple(). Jean Delvare pointed:

Quoted 8 lines
Quoted 5 lines

http://marc.theaimsgroup.com/?l=linux-kernel&m=113398060508534&w=2

out, where _simple looks to be slated for removal. Is this indeed the case? ALSA isn't using the resources -- doing a manual alloc/add would not be a problem...

Great, care to convert ALSA to use the proper api so we can remove platform_device_register_simple()?

Can we mark this deprecated and add it to feature-removal-schedule.txt.

I'm using it about half a dozen times in arch/powerpc and wasn't sure if it was planned on being removed.

- kumar

#4 lore raw
Quoted 16 lines · Kumar Gala
Quoted 13 lines · Greg KH
Quoted 11 lines · Rene Herman

Hi Greg, Russel, Dmitry.

ALSA is using platform_device_register_simple(). Jean Delvare pointed:

http://marc.theaimsgroup.com/?l=linux-kernel&m=113398060508534&w=2

out, where _simple looks to be slated for removal. Is this indeed the case? ALSA isn't using the resources -- doing a manual alloc/add would
not be a problem...

Quoted 4 lines
Quoted 2 lines

Great, care to convert ALSA to use the proper api so we can remove platform_device_register_simple()?

Can we mark this deprecated and add it to feature-removal-schedule.txt.

Sure, I'll take a patch for that. But really, it's just easier to fix up all callers and delete the function. It isn't anything that feature-removal-schedule.txt should care about, as it's just the normal API changes we do all the time.

thanks,

greg k-h

#5 lore raw
Quoted 20 lines · Greg KH
Quoted 19 lines · Kumar Gala
Quoted 15 lines · Greg KH
Quoted 11 lines · Rene Herman

Hi Greg, Russel, Dmitry.

ALSA is using platform_device_register_simple(). Jean Delvare pointed:

http://marc.theaimsgroup.com/?l=linux-kernel&m=113398060508534&w=2

out, where _simple looks to be slated for removal. Is this indeed the case? ALSA isn't using the resources -- doing a manual alloc/add would
not be a problem...

Great, care to convert ALSA to use the proper api so we can remove platform_device_register_simple()?

Quoted 6 lines
Quoted 1 line

Can we mark this deprecated and add it to feature-removal-schedule.txt.

Sure, I'll take a patch for that. But really, it's just easier to fix up all callers and delete the function. It isn't anything that feature-removal-schedule.txt should care about, as it's just the normal API changes we do all the time.

Well, it is an exported interface so I figured that fit in the same category as removing the export of insert_resource.

But, I'm not too concerned one way or the other about it.

- k

#6 lore raw
In reply to Greg KH
Quoted 8 lines · Greg KH
Quoted 5 lines

ALSA is using platform_device_register_simple(). Jean Delvare pointed:

http://marc.theaimsgroup.com/?l=linux-kernel&m=113398060508534&w=2

out, where _simple looks to be slated for removal. Is this indeed the case? ALSA isn't using the resources -- doing a manual alloc/add would not be a problem...

Great, care to convert ALSA to use the proper api so we can remove platform_device_register_simple()?

Sure. Before I go over them though, could you perhaps confirm that just doing a manual alloc/add _is_ this proper API? Ie, something like:

    device = platform_device_alloc(NAME, i);
    if (!device)
            return -ENOMEM;

    error = platform_device_add(device);
    if (error) {
            platform_device_put(device);
            return error;
    }

(there by the way are still a few users left outside ALSA as well)

Rene.