lkml.org 
[lkml]   [2005]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Calling suspend() in halt/restart/shutdown -> not a good idea
    From
    Date
    On Wed, 2005-08-03 at 12:53 -0400, Kyle Moffett wrote:
    > On Aug 3, 2005, at 07:40:54, Benjamin Herrenschmidt wrote:
    > >> I'd like to get rid of shutdown callback. Having two copies of code
    > >> (one in callback, one in suspend) is ugly.
    > >
    > > Well, it's obviously not a good time for this. First, suspend and
    > > shutdown don't necessarily do the same thing, then it just doesn't
    > > work
    > > in practice. So either do it right completely or not at all, but
    > > 2.6.13
    > > isn't the place for an half-assed hack that looks like a solution to
    > > you.
    >
    > One possible way to proceed might be to add a new callback that takes a
    > pm_message_t: powerdown() If it exists, it would be called in both the
    > suspend and shutdown paths, before the suspend() and shutdown() calls to
    > that driver are made. As drivers are fixed to clean up and combine that
    > code, they could put the merged result into the powerdown() function,
    > and remove their suspend() and shutdown() functions.

    We already have shutdown() for that.

    Ben.


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-08-03 22:06    [W:2.290 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site