libcamera: v4l2_subdevice: Rename deviceName() method

Rename the 'deviceName()' method to 'entityName()' as it actually
returns the name of the entity backing the v4l2 subdevice.

While at it, make the names getter methods return a const reference
instead of returning by copy.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi 2019-03-22 10:58:26 +01:00
parent a20182310d
commit 5b9b3c38a1
3 changed files with 7 additions and 7 deletions

View file

@ -51,7 +51,7 @@ int ListFormatsTest::run()
formats = scaler_->formats(0);
if (formats.empty()) {
cerr << "Failed to list formats on pad 0 of subdevice "
<< scaler_->deviceName() << endl;
<< scaler_->entityName() << endl;
return TestFail;
}
for (auto it = formats.begin(); it != formats.end(); ++it)
@ -60,7 +60,7 @@ int ListFormatsTest::run()
formats = scaler_->formats(1);
if (formats.empty()) {
cerr << "Failed to list formats on pad 1 of subdevice "
<< scaler_->deviceName() << endl;
<< scaler_->entityName() << endl;
return TestFail;
}
for (auto it = formats.begin(); it != formats.end(); ++it)
@ -70,7 +70,7 @@ int ListFormatsTest::run()
formats = scaler_->formats(2);
if (!formats.empty()) {
cerr << "Listing formats on non-existing pad 2 of subdevice "
<< scaler_->deviceName()
<< scaler_->entityName()
<< " should return an empty format list" << endl;
return TestFail;
}