dev/flash patch

Adrian Chadd adrian at freebsd.org
Wed Jul 20 07:39:20 UTC 2011


That's fine to me.

Just read this:

http://wiki.freebsd.org/Releng/ChangeRequestGuidelines

Then write up what is required, email re@ to get approval.

Thanks,



Adrian

On 15 July 2011 20:22, Aleksandr Rybalko <ray at dlink.ua> wrote:
> Hi all,
>
> I have proposal to tidy mx25l driver, since he have macro's that called
> M25PXX_*. That name match a real(world known) name, but seems renaming
> whole driver is bigger pain than use well known for our users.
>
> Please let me know, if someone have objections or opinion differ from
> my.
>
> Patch:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Index: sys/dev/flash/mx25l.c
> ===================================================================
> --- sys/dev/flash/mx25l.c       (revision 223926)
> +++ sys/dev/flash/mx25l.c       (working copy)
> @@ -79,14 +79,14 @@
>        unsigned int    sc_flags;
>  };
>
> -#define M25PXX_LOCK(_sc)               mtx_lock(&(_sc)->sc_mtx)
> -#define        M25PXX_UNLOCK(_sc)              mtx_unlock(&
> (_sc)->sc_mtx) -#define M25PXX_LOCK_INIT(_sc) \
> +#define MX25L_LOCK(_sc)                mtx_lock(&(_sc)->sc_mtx)
> +#define        MX25L_UNLOCK(_sc)               mtx_unlock(&
> (_sc)->sc_mtx) +#define MX25L_LOCK_INIT(_sc) \
>        mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \
>            "mx25l", MTX_DEF)
> -#define M25PXX_LOCK_DESTROY(_sc)       mtx_destroy(&_sc->sc_mtx);
> -#define M25PXX_ASSERT_LOCKED(_sc)      mtx_assert(&_sc->sc_mtx,
> MA_OWNED); -#define M25PXX_ASSERT_UNLOCKED(_sc) mtx_assert
> (&_sc->sc_mtx, MA_NOTOWNED); +#define MX25L_LOCK_DESTROY(_sc)
> mtx_destroy(&_sc->sc_mtx); +#define MX25L_ASSERT_LOCKED(_sc)
> mtx_assert(&_sc->sc_mtx, MA_OWNED); +#define MX25L_ASSERT_UNLOCKED(_sc)
> mtx_assert(&_sc->sc_mtx, MA_NOTOWNED);
>  /* disk routines */
>  static int mx25l_open(struct disk *dp);
> @@ -356,7 +356,7 @@
>
>        sc = device_get_softc(dev);
>        sc->sc_dev = dev;
> -       M25PXX_LOCK_INIT(sc);
> +       MX25L_LOCK_INIT(sc);
>
>        ident = mx25l_get_device_ident(sc);
>        if (ident == NULL)
> @@ -427,10 +427,10 @@
>        struct mx25l_softc *sc;
>
>        sc = (struct mx25l_softc *)bp->bio_disk->d_drv1;
> -       M25PXX_LOCK(sc);
> +       MX25L_LOCK(sc);
>        bioq_disksort(&sc->sc_bio_queue, bp);
>        wakeup(sc);
> -       M25PXX_UNLOCK(sc);
> +       MX25L_UNLOCK(sc);
>  }
>
>  static void
> @@ -442,14 +442,14 @@
>
>        for (;;) {
>                dev = sc->sc_dev;
> -               M25PXX_LOCK(sc);
> +               MX25L_LOCK(sc);
>                do {
>                        bp = bioq_first(&sc->sc_bio_queue);
>                        if (bp == NULL)
>                                msleep(sc, &sc->sc_mtx, PRIBIO,
> "jobqueue", 0); } while (bp == NULL);
>                bioq_remove(&sc->sc_bio_queue, bp);
> -               M25PXX_UNLOCK(sc);
> +               MX25L_UNLOCK(sc);
>
>                switch (bp->bio_cmd) {
>                case BIO_READ:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> --
> Alexandr Rybalko <ray at dlink.ua>
> aka Alex RAY <ray at ddteam.net>
> _______________________________________________
> freebsd-mips at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to "freebsd-mips-unsubscribe at freebsd.org"
>


More information about the freebsd-mips mailing list