mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
docs/devel/reset.rst: Correct function names
resettable_class_set_parent_phases() was mistakenly called resettable_class_set_parent_reset_phases() in some places. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
6ee07cfbdf
commit
fa365d05b7
1 changed files with 8 additions and 9 deletions
|
@ -184,21 +184,20 @@ in reset.
|
||||||
{
|
{
|
||||||
MyDevClass *myclass = MYDEV_CLASS(class);
|
MyDevClass *myclass = MYDEV_CLASS(class);
|
||||||
ResettableClass *rc = RESETTABLE_CLASS(class);
|
ResettableClass *rc = RESETTABLE_CLASS(class);
|
||||||
resettable_class_set_parent_reset_phases(rc,
|
resettable_class_set_parent_phases(rc,
|
||||||
mydev_reset_enter,
|
mydev_reset_enter,
|
||||||
mydev_reset_hold,
|
mydev_reset_hold,
|
||||||
mydev_reset_exit,
|
mydev_reset_exit,
|
||||||
&myclass->parent_phases);
|
&myclass->parent_phases);
|
||||||
}
|
}
|
||||||
|
|
||||||
In the above example, we override all three phases. It is possible to override
|
In the above example, we override all three phases. It is possible to override
|
||||||
only some of them by passing NULL instead of a function pointer to
|
only some of them by passing NULL instead of a function pointer to
|
||||||
``resettable_class_set_parent_reset_phases()``. For example, the following will
|
``resettable_class_set_parent_phases()``. For example, the following will
|
||||||
only override the *enter* phase and leave *hold* and *exit* untouched::
|
only override the *enter* phase and leave *hold* and *exit* untouched::
|
||||||
|
|
||||||
resettable_class_set_parent_reset_phases(rc, mydev_reset_enter,
|
resettable_class_set_parent_phases(rc, mydev_reset_enter, NULL, NULL,
|
||||||
NULL, NULL,
|
&myclass->parent_phases);
|
||||||
&myclass->parent_phases);
|
|
||||||
|
|
||||||
This is equivalent to providing a trivial implementation of the hold and exit
|
This is equivalent to providing a trivial implementation of the hold and exit
|
||||||
phases which does nothing but call the parent class's implementation of the
|
phases which does nothing but call the parent class's implementation of the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue