From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH 1/1] Add virtio-input driver. Date: Fri, 20 Mar 2015 10:54:33 +0100 Message-ID: <1426845273.32097.39.camel@nilsson.home.kraxel.org> References: <1426756391-26585-1-git-send-email-kraxel@redhat.com> <1426756391-26585-2-git-send-email-kraxel@redhat.com> <20150319162704.GE30732@dtor-ws> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: In-Reply-To: <20150319162704.GE30732@dtor-ws> To: Dmitry Torokhov Cc: David Herrmann , virtio-dev@lists.oasis-open.org, virtualization@lists.linux-foundation.org, mst@redhat.com, Rusty Russell , open list , "open list:ABI/API" List-Id: linux-api@vger.kernel.org Hi, > > > +static ssize_t serial_show(struct device *dev, > > > + struct device_attribute *attr, char *buf) > > > +{ > > > + struct input_dev *idev = to_input_dev(dev); > > > + struct virtio_input *vi = input_get_drvdata(idev); > > > + return sprintf(buf, "%s\n", vi->serial); > > > +} > > > +static DEVICE_ATTR_RO(serial); > > What is serial? Serial number? Yes. You can (optionally) configure a serial number on the host side, and if that is the case it'll show up here. > > Can you set vi->idev->uniq to the virtio-bus path? > > No, uniq can't be phys as phys is unique within the system while uniq is > like serial number or UUID and should never repeat. Ok, so I guess I should just fill uniq with serial (if present). cheers, Gerd