From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id F18A51EFDE1; Fri, 1 Sep 2017 11:25:20 -0400 (EDT) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003:c06::236]) by befuddled.reisers.ca (Postfix) with ESMTPS id 151AF1EFDD8 for ; Fri, 1 Sep 2017 11:25:19 -0400 (EDT) Received: by mail-oi0-x236.google.com with SMTP id n18so4560939oig.2 for ; Fri, 01 Sep 2017 08:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=eE87lhk05g3hNKygkB2PDDJ883Vp3T/86vIxAto+oUI=; b=ByLTnAxcYo8Q53qdDkSkX/IsoHnMHYz9ED7L5J6jrqsoU7anTYPlQ/cIj1n4ltdta6 qgd//iBpiH9vhgT+VnmMn7FNVDXFRw3aSEiEXIZSwpYjrQa4BDCxiXnoFLg8afqYdr0W gzqfsYQUdE9o6CuIqSigLPKzqu7OrfykG6+iBZ16R5umOBytzcuX2bSX3dGHzNXDbYko AYhz3LyWj5KgPE2dymGvKqM2M/C75z8syTMN5Hx9tl9XkkPvE5c57tUncs5zf3xeRlvP o32haxQuV1+mH/KzDOaXwM5rFF1LK7q3YRRei6uEbqLanLoDlj6e2VjJKo7F30YB0lhy x4mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=eE87lhk05g3hNKygkB2PDDJ883Vp3T/86vIxAto+oUI=; b=kS7AP10zSqrD8L56iKUu1BSDfRdmBbMudH4Y8VjiKvx3vya2ArKGVrEEM78uZZS21V glSScy6sj1Z9pgM/uf+nvw1Uig119Z7z5HyBLvzXpeJpv9nfA1VY6Lc7ub0MZdDfucDY 4P9cqLRCpGbSdWwEe1vU7vguu2DNKbAnOwREITQdvvgvldGIU3poP9wYq8xAGgBmRaR7 puF/tiTdQ7GROO77xXeCHbe6M6kzV4JfkYFmLcnxi2B0xtyzO6dnb2dCtGQkjf/9+u2/ 05mpAcUDyOorpIryBQG1fnIlwidhhGlRGu0SCbgldUa5yRdWJwv0TgORvcjVYia8v19C wnhw== X-Gm-Message-State: AHPjjUhsNgZYjlj3KxanzYiw1v8MNrW+u8GNuVjEsssGx9KcMu6j9vBj kyQ266cZ348g2qZUgOfQaVOtaV7Kdw== X-Google-Smtp-Source: ADKCNb6iJnIoLeZNQhdxHVQ7sBIQQJXxj7005KTk4CWsBmgHKgb2bnpGVRo5yjMjCTs8nTW8xMT7346pm36Bl9f2mdk= X-Received: by 10.202.117.129 with SMTP id q123mr1938798oic.4.1504279513289; Fri, 01 Sep 2017 08:25:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.21.59 with HTTP; Fri, 1 Sep 2017 08:25:12 -0700 (PDT) In-Reply-To: <20170831234402.5y5wxff5ghoz5yrc@var.youpi.perso.aquilenet.fr> References: <20170831182159.GA480@sanghar> <20170831234402.5y5wxff5ghoz5yrc@var.youpi.perso.aquilenet.fr> From: Okash Khawaja Date: Fri, 1 Sep 2017 16:25:12 +0100 Message-ID: Subject: Re: usb-autoload To: Samuel Thibault Cc: "Speakup is a screen review system for Linux." Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Sep 2017 15:25:21 -0000 Hi, On Fri, Sep 1, 2017 at 12:44 AM, Samuel Thibault wrote: > Hello, > > Okash Khawaja, on jeu. 31 ao=C3=BBt 2017 19:21:59 +0100, wrote: >> speakup module will be pre-requisite for speakup_usb_serial so it >> will already be in memory when following flow starts from inside >> speakup_usb_serial. > > Right, that's a good thing indeed, because that makes a place where to > store the major/minor information. > > I'd say it could be done this way: > > - add dev variable to the speakup module, initialized to NULL > - when a USB speakup driver gets loaded, it sets ser and dev in the > speakup module, and then loads the driver module, and if not started > yet, starts it. > - when synth_init sees that speakup's dev variable is non-NULL, use that > instead of the module parameters. Okay this is a simpler approach so I'll use it. One thing I'll add is to also add a synth_name variable to speakup. When setting dev we also set synth_name so that dev override doesn't happen for some other synth module that gets accidentally loaded between us setting speakup's dev and us loading the synth driver module. Highly unlikely but can potentially brick a synth, e.g. during testing. Thanks, Okash